A semiconductor device has: a memory element which is arranged on a
semiconductor substrate and records information therein; a terminal for
inputting first voltage for recording the information to the memory
element and second voltage lower than the first voltage for reading out
the information from the memory element; and an electrostatic discharge
protection circuit which is connected to the terminal. The electrostatic
discharge protection circuit includes a diode whose cathode is connected
to the first terminal and whose anode is connected to a ground potential,
and a first MOS transistor whose drain and gate are connected to the
terminal and whose source and back gate are connected to the ground
potential.