The difference between EEPROM and flash

Memory is divided into two categories: RAM and ROM.
ROM development process introduction
ROM can not be programmed at first, and the content of the factory will always be the same, which is inflexible. Later, PROM appeared, which can be written once by yourself. If you make a mistake, you can only change one, and consider yourself unlucky. Human civilization continues to progress, and finally there is an EPROM that can be erased and written multiple times. Every time it is erased, the chip needs to be exposed to ultraviolet light. Think about it after you download a program to the microcontroller and find that there is a place where you need to add a sentence , for this reason, you have to put the microcontroller under the ultraviolet light for half an hour, and then you can do it again. You can't change it several times a day. The wheel of history keeps moving forward, and the great EEPROM appeared, which saved a large number of programmers, and finally can modify the contents of the ROM at will.
The full name of EEPROM is "Electrically Erasable Programmable Read-Only Memory", that is, Electrically Erasable Programmable Read-Only Memory. It is relative to UV-erased ROM. But today there are many variants of EEPROM that have become a collective name for a class of memory.
Narrow EEPROM:
This ROM is characterized by random access and modification of any byte, and 0 or 1 can be written to each bit. This is the most traditional EEPROM, the data will not be lost after power failure, it can be stored for 100 years, and can be erased and written 100w times. It has high reliability, but the circuit is complex/cost. Therefore, the current EEPROMs are tens of kilobytes to hundreds of kilobytes, and rarely more than 512K.
Generalized EEPROM:
flash belongs to the generalized EEPROM because it is also an electrically erasable ROM. But in order to distinguish it from the general EEPROM that is erased and written in units of bytes, we call it flash. The improvement made by flash is that erasing is no longer in bytes, but in blocks, which simplifies the circuit, increases data density, and reduces costs. The ROM on M is generally flash.
Flash is divided into nor flash and nand flash. The nor flash data line is separated from the address line, which can achieve the same random addressing function as ram, and can read any byte. But erasing still has to be done in blocks. NAND flash is also erased in blocks, but the data line and the address line are multiplexed, and the address line cannot be used for random addressing. Reading can only be done by page. (nandflash erases in blocks, reads in pages, norflash has no pages). Due to the multiplexing on the nandflash pins, the read speed is a little slower than the nor flash, but the erasing and writing speeds are much faster than the nor flash. The internal circuit of nand flash is simpler, so the data density is high, the volume is small, and the cost is low. Therefore, large-capacity flash is nand type. Small-capacity 2-12M flash is mostly nor type. In terms of service life, the erasing times of nand flash is several times that of nor. And nand flash can mark bad blocks, allowing software to skip bad blocks. Once the nor flash is damaged, it can no longer be used. Because nor flash is byte addressable, programs can run in nor flash. Embedded systems use a small-capacity nor flash to store boot codes, and a large-capacity nand flash to store the file system and kernel.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326173249&siteId=291194637