摘要 |
PURPOSE: An on-board programming method is provided to use a RAM in a micro controller embedding a flash memory so that it can reduce the number of the flash memory. CONSTITUTION: The method comprises steps of copying a write program, stored in a specific area of a flash memory, to a specific area of a RAM and simultaneously loading addresses and new dat to the RAM via a port(S10), executing the program copied in the RAM(S12), loading the address to be updated on an address buffer of a flash memory by the program(S14), loading the data of the RAM on the data buffer(S16), updating the data of the flash memory(S18), and determining if all the data is updated(S20). To update the data in the flash memory, the CPU enables a write control signal. The write time for writing the data at the flash memory can be set by using a repetition statement and a timer or a counter in a micro controller.
|