Patent ID: 7549593

Claim:
A semiconductor device which comprises external interface terminals and processing circuits, and which is fed with an operating power source when detachably set in a host equipment, wherein: said external interface terminals include power source feeding terminals, an extraction detecting terminal, and other terminals; said power source feeding terminals are long enough to keep touching corresponding terminals of the host equipment for, at least, a predetermined time period since separation of said extraction detecting terminal from a corresponding terminal of the host equipment; said power source feeding terminals are formed to be longer in an extraction direction than said extraction detecting terminal; said processing circuits include an interface control circuit which is connected to said external interface terminals, and a rewritable nonvolatile memory which is controlled by said interface control circuit; said nonvolatile memory stores information on the basis of a difference of threshold voltages of memory cells; and said interface control circuit causes said nonvolatile memory midway of a rewrite process to complete a predetermined process, before cutoff of the power source after the separation of said extraction detecting terminal from the corresponding terminal of the host equipment.