The identification terminals 16, 17 are entirely plated with solder, and additionally plated with gold near their extreme ends. For example, a first latch can be used to latch a first state of an input to a flip-flop in response to a first edge of a clock signal and a second latch can be used to latch a second state of the input to the flip-flop in response to a second edge of a clock signal. The write range calculation circuit calculates a write range, based on the calculated number of bits to be written simultaneously, and the program pulse generating circuit generates a program pulse based on write data and on the generated identification code and the calculated write range.