Patent ID: 6724678
Filing Date: 2004-04-20
Classification: G11C

Abstract:
A nonvolatile semiconductor memory unit which is provided with a nonvolatile semiconductor memory and a control means for performing a read operation, a write operation and an erase operation on the nonvolatile semiconductor memory unit, comprising:an external power source which derives its supply of electric power from outside; an internal power source which derives its supply of electric power from a secondary battery and is connected to the nonvolatile semiconductor memory and the control means; a voltage detecting circuit for detecting a voltage of the external power source; and a switching circuit which is provided between the external power source and the internal power source and is subjected to on-off control by an output of the voltage detecting circuit so as to enable and disable the external power source, respectively; wherein when the voltage detecting circuit has detected that the voltage of the external power source is lower than a predetermined level, an output signal of the voltage detecting circuit not only is inputted, as an interrupt signal, to the control means but is inputted, as an off-state signal, to the switching circuit; wherein the internal power source is actuated by the secondary battery for a predetermined period after the eternal power source has been disabled by the switching circuit turned off by the off-state signal; wherein in response to the interrupt signal, the control means calls an interruption handling routine in which not only in write and erase of the nonvolatile semiconductor memory, only the write operation and the erase operation under way in the nonvolatile semiconductor memory are completed properly but by recording in the nonvolatile semiconductor memory a flag indicating that a processing has been interrupted by disconnection of the external power source and contents of residual processings to be executed, data of the nonvolatile semiconductor memory can be restored in case the external power source has been recovered later.