The present invention relates to a technique effective for application to a method of applying a write voltage in an electrically erasable programmable nonvolatile memory, and a technique effective for use in a flash memory capable of erasing data in a lump, for example, on a block unit basis and a microcomputer having therein the flash memory.
A flash memory uses a nonvolatile memory cell taking the form of a MOSFET of a two-layer gate structure having a control gate and a floating gate, and a memory cell can be constructed by a single transistor. Conventional methods of writing data into a flash memory include a method of changing a threshold voltage by injecting or discharging charges to/from a floating gate by using an FN tunnel phenomenon by applying a voltage across the control gate and a substrate (what is called a well region) or across the control gate and a source or drain, and a method of changing a threshold voltage by passing a current between the source and the drain in a state where a high voltage is applied to the control gate and injecting hot electrons generated in a channel into the floating gate and discharging charges from the floating gate by using the PN tunnel phenomenon.
According to the writing method using the FN tunnel phenomenon, a write current is low, so that data can be written on a word line unit basis of, for example, 128 bytes. The method has an advantage such that data can be written in a lump. On the other hand, according to the writing method using hot electrons, a write current is high and it is difficult to write data in a lump on the word line unit basis, so that data is written on the basis of a unit such as one byte. It is difficult to reduce the size of a memory cell employing the writing method using the FN tunnel phenomenon in relation to a withstand voltage and the packing density does not therefore increased.
In any of the above writing methods, in many cases, data in a flash memory is erased on a block unit basis, that is, data in a plurality of sectors commonly using a well region is simultaneously erased.