# EEPROM being both “programmable” and “read-only”

Since it is called programmable, I tend to think that it should also be named with the write option. What is the deal here?

Although they both involve changing the contents of memory, writing and programming are not the same thing.

• Writing is done with the chip connected to the processor, during a normal processor cycle, and using normal voltages.

• Programming involves conditions that are not normally produced by a processor. There may be a need to erase the memory first (possibly using ultraviolet light). It may require higher voltages. It may be more convenient to remove the chip from the circuit and program it with dedicated programming equipment. In most cases, the programming process takes much more time than a regular memory access. The bottom line is that a normal processor write cycle is not adequate to program a chip.

RAM can be directly written by a processor. There is no need to program RAM.

Masked ROM can neither be written nor programmed.

However, the various types of PROMs can only be programmed. A normal processor write does not generate the conditions needed for programming, so PROMs cannot be written.

• I guess this one is the most suitable one in terms of it being the most direct answer to the question. That's why I chose this one over the other answer, even though they are also valuable and they have more upvotes than this one. – muyustan Jun 15 at 9:15
• An EEPROM in a microcontroller, like an AVR, is an example of an EEPROM that is just as writable as it is readable. The processor doesn't have any significant difference in reading and writing it. – Abdullah Baig Jun 15 at 11:33
• @AbdullahBaig: No, you still must wait before programming the next address on an AVR. Table 20-11 of the ATtiny data sheet is the "Minimum Wait Delay Before Writing the Next Flash or EEPROM Location". 4.0 ms for EEPROM, 4.5 ms for fuses or flash, 9.0 ms for a full erase. That's far in excess of a single instruction cycle. – DrSheldon Jun 15 at 12:31
• It's also worth noting that with EPROM, the UV exposure restores all bits to 1. Programming can only change 1 bits to 0, it can't do the reverse. So even if you did have the necessary voltage and circuitry on the board, it's still not writeable like conventional RAM, since you can't replace e.g. 0x3c with 0xa5 since that would require reverting several 0 bits to 1. – dgnuff Jun 15 at 20:20
• @DrSheldon You are right. Writing an EEPROM is a different process than reading it. And it's obviously not like RAM. But that wasn't my point to say reading and writing are exactly same in every aspect. – Abdullah Baig Jun 17 at 18:24

Mask ROM. In Mask ROM, there is no reprogramming. Conceptually, 1's are directly connected to VCC and 0's are directly connected to ground with metalized areas in the construction of the IC. But you literally need to alter the design of the chip and make new chips to change it. So if you commit executable code to mask ROM and then find a bug, you have to make new chips to fix it.

Old-style EPROM (erasable programmable ROM). UV erasable programmable ROM. The chip has a transparent window on it. You uncover the window, put it in a UV chamber and expose it to UV radiation to erase it. Then you cover the window, program it using a special programmer. After that it is effectively read only memory (ROM) unless you erase it again, which usually cannot be done in-circuit.

EEPROM. Electrically Erasable Programmable Read Only Memory. Some kind of special step is required to erase it and program it (possibly high voltage) and then it can be treated as ROM. Usually it is possible to erase/reprogram in circuit if desired, but there is also usually a write-protect pin. If you disable writing via the WP pin, this can be treated like ROM in the sense that the only way to reprogram it is to remove the IC from the circuit.

OTP flash. One-time programmable flash is rated to be erased and programmed only once. After that it can be treated like ROM. Sometimes it is programmed prior to PCB assembly and sometimes after. Losing memory contents during reflow oven exposure could be a concern.

This is just off the top of my head.

• Is OTP flash actually flash and they just did not bother to implement the erase circuitry? Or fuses? – DKNguyen Jun 13 at 19:55
• The earliest OTP were UVEPROM chips sold in the low-cost plastic encapsulated package. The UVEPROM quartz window for erasing requires the more expensive ceramic package, so the plastic OTP was an economic option to reduce costs in low to medium volume production, where the device contents were already developed. Most of the cost of the UVEPROM was due to the its quartz widow packaging. – MarkU Jun 13 at 22:23
• Between Mask ROMs and EPROMs there were, IIRC, PROMs. Manufactured as essentially a collection of fuses, programming consisted of (selectively) "blowing" those fuses and was a truly one-shot process (in a different way to plastic-encased UV EPROMs and OTP Flash, which were both based on reprogrammable technology, but with the "re" part disabled). – TripeHound Jun 14 at 5:57
• There is also the PROM, which can be programmed once with a special "burner" where connections inside are burned away once and for all. – Baard Kopperud Jun 14 at 18:52
• PROMs can be either of the "fuse" type where you burn wires ("fuses"), or they can be of the "anti-fuse" type, where you burn away isolation to create a connection. In either case, you have an individual fuse or anti-fuse per bit. – Michael Karcher Jun 14 at 23:10

I feel that the confusion comes from the fact that a clearly writable memory is called read-only in its name.

The resolution of the paradox: these memories contain data, which is not or just rarely intended to be changed, and they operate as ROMs for most of the time. Changing the data in them often require special conditions (UV light, high voltage) and relatively long time.

For example a flash memory is similar to an EEPROM in the sense that it can store the data without external power, but mainly due to its easy writing procedure it is not called ROM.

As it often happens with naming, there are no strict rules, what device falls into a given category and it is often influenced by the marking efforts of a new product.

• I think this explains it best. The reason they are considered "read-only" is that, in the normal course of execution, they are read-only. Writing is fundamentally different than reading and requires special equipment, special commands, special environment, sometimes even physically removing the chip. To put it simply, programming a PROM is a Big Deal, writing a RAM is a non-event. – Jörg W Mittag Jun 14 at 7:09
• @muyustan If you find an answer or comment helpful, there's an upvote button. Note that there is even a text telling you not to write "thank you"-style comments when you try to write one. – pipe Jun 15 at 1:09

This has to do with the history of this technology: ROM (contents set in manufacturing), PROM (one time programmable), EPROM (erasable using UV light) and then EEPROM (electronically erasable) that can be written, erased, re-written by the host IC using a serial or parallel interface.

For instance, I've used EEPROM ICs that communicate over I2C in order to store calibration data. The only reason I've used an EEPROM is that from time to time the data was re-written with updated calibration data. I suppose that the only reason the EEPROM is called read-only is because it has endurance limitations regarding Erase/Write procedures (such as 100.000 erase/write cycles - reads are not a problem at all). This has to do with the silicon technology used in EEPROM devices (aka flash memory, because EEPROM is in fact a NOR flash memory): high voltages are used to program the flash memory floating gate, the oxide layer isolating the gate degrades. However, there are some wear leveling mechanisms that prolong the life of the memory distributing evenly the write/erase cycles in order to do not have high concentration of W/E cycles in one area.

So, why is "read-only" ? Because you have to use it carefully, and to write to memory "from time to time". If you replace a RAM memory with an EEPROM memory and the application writes data once per second the memory exceeds the endurance rating in a few days. You'd better use a FRAM memory. Long story short, EEPROM is used to store settings data, calibration data, etc

• useful informations not present in other examples, thanks – muyustan Jun 13 at 20:41

Originally, the devices called "ROMs" were in fact read-only. The data stored in them was put in place as part of the manufacturing process and could not be changed.

When the first UV erasable memories were introduced they were named EPROMs, but they were not truly read-only. By a relatively long exposure the memory could be erased, and then could be written using relatively high voltages. After that, the memory would retain the written information even when power was removed and could be read quickly.

So, the term "ROM" has been appropriated for memory technologies that can be erased and rewritten but will hold the stored data even when power is removed. I suppose that it would be better to call them "non-volatile memory", but here we are.

• Do they still use true ROMS in spacecraft? Maybe not because no software updates. – DKNguyen Jun 13 at 19:45
• @DKNguyen I am not sure if discrete ROMs are used, but many microcontrollers have embedded ROM hosting a MFG provided bootloader. – crasic Jun 13 at 19:56
• "Do they still use true ROMS in spacecraft"? The answer is YES. Most space-based single board computers have a combinations of ROM, EEPROM, and SDRAM. The EEPROM stores the executable image (or maybe just the kernel), and can be programmed from the ground. The small (16 KB - 64 KB) PROM stores the very low level boot code that, in addition to booting up the CPU has just enough smarts that a new exceutable image could up uploaded from the ground. – SteveSh Jun 13 at 20:24
• @SteveSh I think the choice of specific memory technologies will depend heavily on the exact mission and radiation environment. Even the choice of equatorial or polar orbit, LEO or geosynchronous, will drive the design in different directions. – Elliot Alderson Jun 14 at 18:33
• @Elliot - I agree, to some extent. But the use of ROM for the boot code is more of a single point failure (SPF) mitigation technique. You want to be able to recover from anything that may have disturbed the contents of the EEPROM. – SteveSh Jun 14 at 20:57

Originally, writing to an EPROM was done with special equipment - an EPROM Programmer - these parts could not be programmed in-circuit, as they required higher than normal voltages and special writing routines.

Newer EPROMs can be written in-circuit, but require special commands which take more time than a write to RAM - a simple "write to memory" processor instruction won't work.

There are some non-volatile memories that can be written to as normal RAM, but retain their data without power.

• Ok, this is also a nice answer, if community chooses this one over the other, I would chan ge the accepted answer. Thanks. – muyustan Jun 13 at 19:50
• FRAM devices are begining to supercede in traditional EEPROM applications except the most cost sensitive. They have comparable retention time and read/write cycle capacity , but significantly improved read and write access times (trad eeprom 2ms read/5ms write for 2 bytes, fram is 10ns for both) – crasic Jun 13 at 20:03
• @crasic FRAM or MRAM? FRAM has write endurance still. I'm still waiting for MRAM to drop to 512Mb for $15. Right now it's still at like...32Mb for$80. I read that FRAM has destructive reads which seems pretty terrible for endurance. – DKNguyen Jun 13 at 20:08
• @DKNguyen FRAM, for example FRAM as drop-in replacement for 24c series serial eeproms rated for 100 trillion reads and writes cycles, mouser.com/ProductDetail/Cypress-Semiconductor/… – crasic Jun 13 at 20:24
• Even bus-writable EEPROMs are electrically fabricated as a combination of an EEPROM memory array that requires weird voltages and specially-timed pulses, along with some additional circuitry to generate those voltages and timings, along with switching electronics that can disconnect the array from the bus while programming. – supercat Jun 14 at 23:29

The very first "programmable" ROM, back in the 70s, utilized "fuses". The programming process was slow and involved running a fairly high current through to "blow" fuses for the zero bits, one by one. The programming process required special hardware, and was often done by a 3rd party vs using "in house" capabilities.

There was no way to "erase" such a ROM, allowing it to be reprogrammed, though it was possible to program it in several stages, one address subset at a time, or zero portions that needed to be deleted.

• I imagine this is the type used in space probes...or the masked kind. – DKNguyen Jun 14 at 18:25
• Such "fuse" ROMs are still in wide use. For example, for the last decade all Intel PCH's have a few hundred bits worth of fuse ROM containing encryption key hashes and security-related settings. Some of these fuses are blown (programmed) in the factory, while others are left to be programmed by the OEM. Notably, Intel Secure Boot relies on these fused settings. – Anton Tykhyy Jun 14 at 18:36
• The time required to fully program a bipolar PROM was often comparable to the amount of time required to physically place one into the programmer or remove it after programming. I'm not sure how the per-byte time compared, but since bipolar PROMs were generally very small compared with EPROMs, OTPROMs, or later technologies, the total programming time tended to be shorter. – supercat Jun 14 at 23:25

It's called EEPROM because it's a huge production to re-write it. That makes it far too slow for use as NVRAM.

Also, the mechanism isn't designed for frequent use - it's designed to be rewritten tens of times, e.g. for BIOS updates.

Let's suppose you are building a day-night sensor. The sensor needs to remember the maxima and minima of lux it experienced during the last several days, so it can establish a day-night threshold line for this (potentially shaded; potentially artificially lit) location. Bonus points if it stores that through a power outage. So your algorithm reads/writes that to an EEPROM, and does so every day, even though the values haven't materially changed. Don't do that. If you want to do it that way, use Flash.

ROM = it cannot readily be changed.
PROM = it can be field-programmed at all. (implied: once).
EPROM = it can be erased and reprogrammed. (implied: not electronically).
EEPROM = it can be erased and reprogrammed electronically.

• That's an interesting use of flash – DKNguyen Jun 14 at 18:28
• @DKNguyen yes, a common problem for day/night sensors (e.g. those in PIRs which tell the motion sensor not to light in daylight) is that people retrofit them onto light-switch circuits and turn the switches off sometimes. – Harper - Reinstate Monica Jun 14 at 18:39
• Most EEPROM devices have higher endurance than flash. – supercat Jun 14 at 23:22
• "remember the maxima and minima" is a good fit for writing to a whole sequence of locations, such that each location is rewritten infrequently. – Ben Voigt Jun 15 at 17:21