Abstract: A semiconductor integrated circuit device enabled to perform both a normal writing operation using a voltage elevated with the internal supply voltage taken as the reference voltage and a writing operation with the use of another voltage elevated with an external voltage applied to an external terminal taken as the reference voltage, whereby margin measurement, high-voltage test, and accelerated test are enabled to be performed even after packaging. Further, by providing the apparatus with a mode selector having a plurality of latch circuits operating at different timing connected to an input terminal so that modes are switched by changing combination of the signals latched in such latch circuits, the number of operating modes can be increased without increasing the number of pins.