Do i need to program a new MCU before solder it to the pcb?

Discussion in 'Embedded Systems and Microcontrollers' started by xchcui, Jan 1, 2016.

  1. xchcui

    Thread Starter Member

    May 12, 2014
    80
    0
    Hello.
    Recently,i install a new seven segments display instead of failed one
    in an air conditioner display pcb and i wondered if i can
    change,also,the MCU in the same manner(if it was failed)as the 7 segments display.
    I mean:if i need to buy 7 segments display,i can buy it by looking for a one that is
    with the same specification and install it.
    If i need to replace a failed driver(in my case HC373/D type latches)i can find it
    by this code and solder it.
    As you can see without any special process.
    But if i need to replace a failed MCU,in my case:68HC05P9,
    Is it enough simply to look for a MCU with that code,buy it and solder it directly to the pcb?
    or the MCU should be programed first?
    I don't have any failed MCU,but i wonder if buying a MCU follow its code that marked on it,
    means that the MCU has already a special and unique programmable,that is already made in it and it fitted only to the same display circuit, or,perhaps,buying a MCU with the same code is not enough,as you must program it?
    I took my recent job as an example,but it is a general question?
    Thanks in advance.
     
  2. SLK001

    Well-Known Member

    Nov 29, 2011
    811
    224
    It needs to be programmed first, unless there are provisions on the PCB to program in place. You need to pull the onboard program off the device, and hope that it doesn't have the protection flag set. If it is a masked programmed device, you'll need a version that can be manually programmed and is pin compatible.
     
    xchcui likes this.
  3. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    The original micro contains proprietary code put there by the ACU manufacturer.

    An off the shelf micro will just be blank - the only place you can get the code is from the ACU manufacturer, and they'll probably want to sell you a programmed MCU for nearly as much as a new ACU.
     
    xchcui likes this.
  4. dl324

    Distinguished Member

    Mar 30, 2015
    3,235
    619
    It depends on whether the device has any ROM that was programmed. Some 6805 had no ROM. Some were EPROM, some were mask ROM.
     
  5. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Depends. If the MCU's program is stored in internal flash memory, then it would need to be programmed.... well, I see dl beat me to it.
     
  6. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    AFAICT: its a mask ROM CPU, or at least that's what the datasheet from the number posted by the TS seems to suggest.

    Or in other words: the ROM contents are determined during manufacture - you probably need a production run of a few hundred thousand to make the overhead worthwhile.
     
  7. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    Most modern mcus support in-circuit programming, assuming that the programming pins satisfy the requirements listed in the datasheet.
     
  8. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    You may have misunderstood the concept of "mask programmed ROM".
     
  9. xchcui

    Thread Starter Member

    May 12, 2014
    80
    0
    It seems like(from your responses)that i can't buy the MCU by its code
    and simply solder it.
    But since i am not sure that i fully understood the issue,
    let me describe a real specific situation(refer to the air conditioner display pcb) and maybe it will help me to clarify the issue better.
    Lets say that the MCU of the air conditioner display failed.
    I check and see that the code which marks on the MCU is 68HC05P9(motorola brand).
    (btw,you can see the data sheet on:
    http://www.ddrservice.net/f0z/Integrated-circuits/M/68/68hc05p9.pdf).
    So,i type the code in ebay and find that:
    http://www.ebay.com/itm/Microcontro...161993?hash=item2a5df80609:g:hPIAAOSwUdlWcwuO
    So,if i order that particular MCU from ebay,can i solder it directly to the pcb instead of the failed one,
    without any preminilary actions(program it etc.)?
    BTW,i have noticed that the code in ebay last with P7 instead of P9
    and since i am not sure how much is it matter and what does it refer to,
    lets relate to the question as the MCU code in ebay
    is finished the same way as the old/failed MCU- with P9.
     
  10. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    You can always solder anything in it.

    Whether it works or not is another question - and I highly doubt that it will in this case.
     
  11. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    989
    No it is not programmed.

    Just buy the whole controller board. How can you be so certain it is just the mcu at fault?
     
  12. dl324

    Distinguished Member

    Mar 30, 2015
    3,235
    619
    Most likely not. Read sections 1, 4, and 12 of the PDF you linked to.
    Even if the eBay part had the same part number as the one in the AC, it might not work. The part you referenced is a mask programmed device. Many customers can order that part number and apply different user code. Even the manufacturer of the AC in question may have multiple revisions of that microcontroller.
     
    xchcui likes this.
  13. xchcui

    Thread Starter Member

    May 12, 2014
    80
    0
    As i mentioned before,the MCU didn't fail.
    I asked that question in order to understand if replacing a MCU is
    simple as replacing the 7 segments display,flip-flops components etc.
    In order to know what can i do in the case that MCU will fail.
    But it turns out that it is not as simple as i thought(searching and buying it only by its code
    and sold it directly as can be done with the other simple components).
    In that case,i assume that it will be necessary to replace the whole controller board,
    as spinnaker suggested,even though it is not the prefered way.
    Dennis,if the 6805 had the type with no ROM,as you mentioned,(even though
    ,i thought that there must be a rom in the mcu)
    Is it mean that in that case i could order it by its code and simply solder it?
    or your last post is related,also,to that case?
     
    Last edited: Jan 3, 2016
  14. dl324

    Distinguished Member

    Mar 30, 2015
    3,235
    619
    If it was a microcontroller with no user internal ROM you could replace it. All microcontrollers and microprocessors have ROM for microcode, look up tables, etc.
     
    xchcui likes this.
  15. xchcui

    Thread Starter Member

    May 12, 2014
    80
    0
    It turns out that replacing an MCU is not a simple task
    such as the other simpler components.
    It was better and easier if we can buy it only
    by its code,while it was already programed and ready to use.
    Maybe in the future.

    Thanks alot for your help.:)
     
Loading...