<p>At the time of a setting action (SET) to set a phase changing element into a crystal state, for example, a pulse at a voltage (Vreset) necessary for melting the element is applied at first to the phase changing element, and a pulse at a voltage (Vset) lower than the voltage (Vreset) and necessary for crystallizing the element is then applied. The magnitude of the voltage (Vset) is so changed in dependence upon the temperature of the atmosphere that the magnitude of the voltage (Vset) may become the smaller for the higher temperature (TH). This improves a writing action margin between the setting action and a resetting action (RESET) for bringing the element into an amorphous state.</p>