摘要 |
A memory rewriting apparatus is provided which does not require ROMs other than a flash ROM while enabling use of interrupts, and in which a program for switching between a normal operation and a program rewriting operation is not complicated. In the memory rewriting apparatus of the present invention, a CPU 10 includes a port output terminal PT and selection output terminals CS0, CS1 and CS2. A memory map switching circuit 20 is provided which is connected with those output terminals, a flash ROM and a RAM. The CPU sets the port output terminal to an "L" level in a normal operation, and to an "H" level at the time of rewriting a flash ROM program, so that a memory map takes a condition as shown in FIG. 2(a) in the normal operation, whereas it takes another condition as shown in FIG. 2(c) in the program rewriting operation. Here, a program for rewriting a high address can rewrite the flash ROM program in a middle address, and execute an interrupt which is generated even in the course of the program rewriting operation since a memory area of the active rewriting program and a memory area being rewritten are different from each other.
|