Patent ID: 7281113

Claim:
A microcomputer with a built-in electrically rewritable nonvolatile memory, comprising: a CPU; the electrically rewritable nonvolatile memory for storing a program executable by the CPU; a plurality of volatile memories having a smaller capacity than that of the nonvolatile memory; a system bus for connecting the CPU, the nonvolatile memory, and the plurality of volatile memories; a program transfer bus provided separately from the system bus for connecting the nonvolatile memory and the plurality of volatile memories; a program transfer section for transferring a part of the program stored in the nonvolatile memory to the plurality of volatile memories using the program transfer bus; an address conversion section for converting an address in the nonvolatile memory which is output from the CPU into an address in each of the plurality of volatile memories; and a voltage detection section for detecting a supply voltage which is to be provided to the nonvolatile memory; wherein: the plurality of volatile memories include a plurality of memories usable as a transfer memory and an execution memory in a switched manner in accordance with an execution state of the program by the CPU; and in a state where the voltage detected by the voltage detection section is lower than a first voltage, the program transfer section transfers the part of the program stored in the nonvolatile memory to the transfer memory, and the address conversion section converts the address in the nonvolatile memory which is output from the CPU into an address in the execution memory.