A semiconductor memory device of the present invention includes an electrically
programmable and erasable nonvolatile memory device which uses a plurality of memory
cells requiring a first potential for reading data and a second potential for data
programming, the second potential being higher than the first potential, a latch
circuit for receiving data and temporarily storing the data, a pulse generator
which generates a pulse used for programming data into a memory cell and is coupled
in order to receive the second potential, a comparator for comparing data in the
latch circuit with data in a memory cell, and a controller for controlling the
pulse generator to repeatedly generate a pulse until the data in the latch circuit
matches the data in the memory cell, the controller coupled to the comparator and
the pulse generator. The controller controls so that the pulse is repeatedly generated
until data is programmed in a memory cell. It is thereby possible to improve the
speed of writing and erasing processes on a nonvolatile memory cell of the present
invention and to improve reliability.