Patent ID: 8296588

Claim:
A microcontroller, comprising: a first low-voltage detection circuit to detect that a power supply voltage is equal to or lower than a first voltage value; a second low-voltage detection circuit to detect that the power supply voltage is equal to or lower than a second voltage value, the second voltage value being lower than the first voltage value; a central processing unit (CPU) to stop operating when the first low-voltage detection circuit detects that the power supply voltage is equal to or lower than the first voltage value; a real-time clock to continue operating unless the second low-voltage detection circuit detects that the power supply voltage is equal to or lower than the second voltage value; and a memory circuit that stores a program for use in processing by the CPU, wherein the first low-voltage detection circuit, the second low-voltage detection circuit, the CPU, the real-time clock, and the memory circuit are formed on a single chip, wherein the CPU performs processing within the microcontroller according to the program stored in the memory circuit, wherein the real-time clock includes; an oscillation circuit to receive an output of an oscillator to generate a clock signal for a clock; a clock counter to perform a count operation based on the clock signal for the clock; and a memory unit, and wherein the memory unit stores a first value set when the CPU sets time information to the clock counter, and the memory unit stores a second value set when the second low-voltage detection circuit detects that the power voltage is to or lower than the second voltage value.