摘要 |
PROBLEM TO BE SOLVED: To obtain a microcomputer in which a flash memory is not erased excessively and whose yield is enhanced by a method wherein a plurality of pulse generators which output different erasure pulse numbers are installed, a readout voltage from a memory array is compared by a plurality of judgment values and one pulse generation circuit is selected. SOLUTION: A first sense-amplifier selection switch 31a is connected, and a second sense-amplifier selection switch 31b is not connected. A power-supply voltage value is judged by using a first sense amplifier 32a. Then, the second sense-amplifier selection switch 31b is connected, and the first sense-amplifier selection switch 31a is not connected. The power-supply voltage value is judged by using a second sense amplifier 32b. Whether two judged values are identical or not is judged. When they are identical, the bit 0 of an erasure-pulse selection register 42 is selected. When they are different, the bit 1 of the erasure-pulse selection register 42 is selected. The output of a first pulse generation circuit 17a is used as erasure pulses 15, and an erasure operation is performed fine. |