??? 01/04/07 20:08 Read: times |
#130387 - I done it in AT89c51ED2 Responding to: ???'s previous message |
The "monitor" or "operating system" was in the lower 8K you can receive the file in hex format from the uart, each line was verified and then programed in to the flash. This is so easy at least in the device i used, you must charge some registers and do a call instruction.
The "monitor" was not saved or protected but the routine can be modified to protect some adresses if you want. Te memory allocation was done by the user but the system can tell you the starting and ending addr of the .hex file on request. You can send 8 "programs" and then launch one of them, of course if you send a program in the area of the executing program the system will crash. You can send one prog while you are executing other too. All "programs" must have a main loop opened to return the control to the system and allow to change the "aplication" The variables etc must be controlled for the programmer. All was done in assembler but you can send apps compiled from SDCC if you want, i changed the headre or the SDCC generated code to allow this. All serial was done with interrupts and two fifo buffers in the first 256 bytes of the on-chip external ram. Other interesting feature is: As the ED2 has a bit of POR that tell you if the reset is from the pin or from the internal reset generator, the system executes the running aplication if power fails, however executes the main "monitor" if you push the reset, so if you app don't works you can push the reset and try again. However on power fail the app will continue it's work without human action. |
Topic | Author | Date |
IAP on Atmel 89C51AC2 | 01/01/70 00:00 | |
I done it in AT89c51ED2 | 01/01/70 00:00 | |
I did that in a CAN environment with CC01/03![]() | 01/01/70 00:00 |