Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Microcontroller Self Programming

Status
Not open for further replies.

tahir4awan

Full Member level 4
Joined
Nov 29, 2010
Messages
208
Helped
16
Reputation
32
Reaction score
17
Trophy points
1,308
Location
Germany
Activity points
3,084
What is mean by self programming? I only know about two programing i.e programmer board programming and ICSP.
Does it mean that those microcontrollers which do not have ICSP capability are programmed with this method in which a boot code is copied to target microcontroller so that it can program itself without taking it out from the circuit.Am I right? or it is something else? Please explain.
 

What is mean by self programming? I only know about two programing i.e programmer board programming and ICSP.
Does it mean that those microcontrollers which do not have ICSP capability are programmed with this method in which a boot code is copied to target microcontroller so that it can program itself without taking it out from the circuit.Am I right? or it is something else? Please explain.

I use this technique with the SST89E58RDA MCU which is referred as In-Application Programming (IAP).
I believe if you read its datasheet you can have a good idea.
 

It says in IAP mode one block of memory executes while other block of memory can be programmed or erased. I will ask again does it mean that those microcontrollers which do not have ICSP capability are programmed with this method in which a boot code is copied to one block of memory of microcontroller so that it can program other block of memory without taking out microcontroller from the circuit.
 

Is this what you are talking about: **broken link removed**

Sometimes known as a bootloader.

John
 

But what is the purpose of a bootloader? Where do we use it?
 

It "self programs", but uses up space too. I prefer ICSP for the smaller chips, which I am not sure can use the the bootloader either.
John
 
I was right. Bootloader is used with those microcontrollers which do not have ICSP capability or Bootloader is used for convenience if we don't want to use an expensive programmer to program a microcontroller.
 

It says in IAP mode one block of memory executes while other block of memory can be programmed or erased. I will ask again does it mean that those microcontrollers which do not have ICSP capability are programmed with this method in which a boot code is copied to one block of memory of microcontroller so that it can program other block of memory without taking out microcontroller from the circuit.

In my case, first, I program the MCU using a conventional programmer (I erase anything on it). But in my firmware I write the instructions that let me reprogram it while the MCU is on board. These instructions are usually located in the smaller block while the main program resides in the larger one.
When I need to reprogram its main program (though usually I update some data in it only), I let the MCU read/write its new program from a serial EEPROM as 24C512 also on board. To be in the safe side, I add a small MCU which has the job to read the data or the new program from an external source and write it on this 24C512 while checking that all what it is received is 100% valid. Then when the download will complete, the small MCU signals the main MCU that a new data (or program) is ready for it on 24C512. For instance, the latter is also important as a backup in case power is cut during IAP mode.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top