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

Thread Starter

xchcui

Joined May 12, 2014
272
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.
 

SLK001

Joined Nov 29, 2011
1,549
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.
 

ian field

Joined Oct 27, 2012
6,536
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.
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.
 

dl324

Joined Mar 30, 2015
16,846
It depends on whether the device has any ROM that was programmed. Some 6805 had no ROM. Some were EPROM, some were mask ROM.
 

Brownout

Joined Jan 10, 2012
2,390
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.
 

ian field

Joined Oct 27, 2012
6,536
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.
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.
 

dannyf

Joined Sep 13, 2015
2,197
Most modern mcus support in-circuit programming, assuming that the programming pins satisfy the requirements listed in the datasheet.
 

Thread Starter

xchcui

Joined May 12, 2014
272
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.
 

dannyf

Joined Sep 13, 2015
2,197
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.)?
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.
 

dl324

Joined Mar 30, 2015
16,846
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.)?
Most likely not. Read sections 1, 4, and 12 of the PDF you linked to.
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
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.
 

Thread Starter

xchcui

Joined May 12, 2014
272
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.
It depends on whether the device has any ROM that was programmed. Some 6805 had no ROM. Some were EPROM, some were mask ROM.
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:

dl324

Joined Mar 30, 2015
16,846
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?
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.
 

Thread Starter

xchcui

Joined May 12, 2014
272
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.:)
 
Top