Actually, not all ICs are programmable; only memory chips can be programmed. However, many microcontrollers now integrate program storage memory, so microcontrollers can also be programmed.
The internal structure of a memory device is composed of numerous MOS transistors. The voltage on the gate of these MOS transistors is difficult to discharge (can be retained for over 10 years), which means the voltage on the gate of the MOS transistors is responsible for the memory function.
During the burning process, the program charges or discharges the internal MOS gate of the chip in binary (0 for low voltage and 1 for high voltage) form to save data. For instance, a sequence of 00000001 data is sent to the memory, where the MOS gate performs charging and discharging to save the data. The first seven zeros correspond to discharging the MOS tubes to a low voltage state, while the trailing one is saved by charging the MOS gate. This way, eight MOS tubes save the sequence of 00000001.
During read operation, the MOS tube gate discharge output is 0, the charge output is 1, and a series of data read outputs are generated.
Microcontrollers first read data from the program memory and then operate strictly according to the program data; when different programs are burned into the internal memory of the microcontroller, its operation varies accordingly.





