Patent ID: 8151130

Claim:
A microcontroller comprising: a first voltage detection circuit that generates a first detection signal when a power supply voltage decreases to a voltage equal to or lower than a first voltage value; a second voltage detection circuit that generates a second detection signal when the power supply voltage decreases to a voltage equal to or lower than a second voltage value, the second voltage value being smaller than the first voltage value; a central processing circuit that has a function of switching between a normal operation mode to carry out a normal operation and a standby mode to operate with power consumption lower than that necessary for the normal operation, performs an interrupt processing operation to shift from the normal operation mode to the standby mode when the first detection signal is generated, and shifts to the standby mode independent from the interrupt processing operation when the second detection signal is generated; and a first memory circuit that stores information indicating that the central processing circuit has shifted to the standby mode before completing the interrupt processing operation.