PURPOSE: To control various kinds of modes without breaking down a device by discriminating a read mode, a program mode, and an erase mode according to a voltage value to be impressed to a program power terminal, and executing the operation of the erase mode.
CONSTITUTION: In the read mode, supply voltage 5V is impressed to a power terminal V cc , and voltage 5V is impressed to the power terminal V pp , and the voltage 5V is detected by a detection circuit 1, and the cell matrix 76 of a storage part 7 is specified by a column H row H signal from a decoder 4, and data is read out by a detection signal ER from the circuit 1. In the program mode, the voltage 5V is impressed to the terminal V cc , and program voltage 12.5V is impressed to the terminal V pp . An H signal from a data buffer circuit 6 and an L signal from an erase circuit 5 are inputted to the storage part 7, and the data is written in. In the erase mode, the voltages 5V and 21V are impressed to the terminals V cc and V pp respectively. The detection signal L and the ER signal of L of the circuit 1 are outputted to the storage part 7, and the data is erased. Accordingly, each mode is selected by the voltage to be impressed to the terminal V pp .