??? 06/05/04 22:15 Read: times Msg Score: +1 +1 Informative |
#71860 - In-Application Programming Responding to: ???'s previous message |
What you're describing would require In-Application Programming, where the microcontroller re-programs itself whilst it is running.
This is certainly possible, but by no means trivial - especially on an 8051-based system. The fundamental problem with doing this on an 8051-based system is that there is no instruction in the 8051 instruction set to write to Code memory. Therefore you need some fancy memory architecture that can dynamically re-map memory between XDATA and CODE at run-time. Another problem is that you can't execute code from a Flash device while at the same time erasing/programming that device. So your fancy memory architecture needs to be further complicated by having an area that can be executing code while another is being erased/programmed. (or you need special "dual-bank" Flash). All of this was, of course, a doddle on the Triscend E5 - but now Xilinx have canned it :-( There was an Application Note on the Triscend Site describing doing almost exactly what you describe. I used this to devise a scheme for remote software upgrade over GPRS for a Client's E5-based GPRS telemetry unit. But the actual re-writing of the Flash is only one part of the problem: you need to be absolutely, totally, 100% certain that you have received & programmed a complete & correct new code image before you "blow away" the old one!! Thus your fancy memory architecture needs to have space to store two complete, indepent code images (plus, possibly, some extra for the programming/download code). |
Topic | Author | Date |
Smart program | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
In-Application Programming | 01/01/70 00:00 | |
An example using a 2nd MCU | 01/01/70 00:00 | |
RE: In-Application Programming | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: MCU decides it needs another program | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: Smart program | 01/01/70 00:00 | |
RE: So it *is* remote code banking! | 01/01/70 00:00 | |
Downloading a Hex file ? | 01/01/70 00:00 | |
RE: not so Smart program![]() | 01/01/70 00:00 |