19
\$\begingroup\$

Electrically Erasable Programmable Read-Only Memory (EEPROM):

If it's using Read-Only Memory (ROM) then how am I able to write to it?

\$\endgroup\$
9
  • 14
    \$\begingroup\$ Does the word "programmable" hint at anything? \$\endgroup\$ Commented Jun 30, 2016 at 15:47
  • 2
    \$\begingroup\$ Original ROM was mask programmed (which is probably where you are confused), but we have to have some way to put something into other ROMs. \$\endgroup\$ Commented Jun 30, 2016 at 15:52
  • 9
    \$\begingroup\$ 'Programmable' will not hint at anything if followed by the non-hint 'read-only'. \$\endgroup\$
    – TonyM
    Commented Jun 30, 2016 at 15:57
  • 4
    \$\begingroup\$ @TonyM, after you add "erasable", "programmable" isn't a lot of use unless it actually means "reprogrammable". But one-time programmable ROMs are also a useful thing since it means you don't need to know the contents before you even place a PO for the part. \$\endgroup\$
    – The Photon
    Commented Jun 30, 2016 at 15:59
  • 3
    \$\begingroup\$ the actual answer is extremely simple: you can program it, but you can't/shouldn't write to it. Like Nick said, both terms here are contextual; "programming" usually means a single cycle of sequential writes, aimed at configuring the chip to do what it's intended to do, usually at very low speed - with regards to Harvard architecture, you won't be able to write to such memory during application execution. Regular "writing" means just that - storing data during program execution, usually with fast and/or random access. \$\endgroup\$
    – user20088
    Commented Jun 30, 2016 at 20:22

8 Answers 8

32
\$\begingroup\$

The EEPROM acronym has some history which follows the development of the technology.

ROM: Read-Only Memory. Written at the factory.

PROM: Programmable Read-Only Memory but programmable (once) by the user. Really a one-time programmable, forever readable memory. Get it wrong and you dump the chip.

EPROM: Eraseable Programmable Read-Only Memory. Usually erased using UV light through a quartz window above the chip. A bit of trouble but very useful.

EEPROM: Electrically Erasable Programmable Read-Only Memory. Can be erased or re-written under program control.

1

Figure 1. An Intel 1702A EPROM, one of the earliest EPROM types, 256 by 8 bit. The small quartz window admits UV light for erasure. Source: Wikipedia EPROM.

So, I hear you say, why do they call it eepROm when it is writeable? The answer to this is, I suspect, that, unlike RAM (random access memory) it holds its contents during power cycle and, therefore, behaved more like a ROM.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Great info! Your answer prompted me to look up the potential of RAM to hold any data beyond power cycle and I found this little gem that you may be interested in. \$\endgroup\$
    – Jacksonkr
    Commented Jun 30, 2016 at 17:13
  • 2
    \$\begingroup\$ Ah, the 1702, the first EPROM I used. It had the strange convention that you had to program the inverse of what you wanted to come out of it, because for some reason the 4004 processor that it was designed to work with used a negative logic convention to document its assembly code. So this fix was to make things 'easier'! \$\endgroup\$
    – Neil_UK
    Commented Jun 30, 2016 at 17:17
  • 4
    \$\begingroup\$ And if you take the ROM->PROM->EPROM->EEPROM evolution to the next step you have "flash" memory. Widely used in USB thumb drives, Solid State "hard" Drives, persistent memory in all manner of consumer gadgets, etc. etc. \$\endgroup\$ Commented Jun 30, 2016 at 17:27
  • \$\begingroup\$ Holding contents between power cycles is far from the only place in which PROM falls dramatically short when compared to equivalently read-spec'd RAM, as I hope my answer makes clear. \$\endgroup\$ Commented Jun 30, 2016 at 20:37
  • \$\begingroup\$ ram is volatile, eeprom is non-volatile, it remembers after a power cycle. rom is non-volatile. eeprom you mostly read and mostly dont write, rom you read and dont write. So eeprom is a lot like a rom and as transistor has described it was part of an evolution of non-volatile solutions. \$\endgroup\$
    – old_timer
    Commented Jun 30, 2016 at 21:17
9
\$\begingroup\$

I'm baffled by how many commentators here think that the term ROM is solely a marketing ploy or referring only to loss of data on power-off.

PROM is very much 'read only', in the qualified sense that writing to it in the same manner and contexts as you would with an 'equivalent' RAM is impossible. This is because E/EPROM requires:

  • erasure by UV (EPROM) or an 0xFF cycle (EEPROM),
  • switching into a different mode for programming ('writing') data,
  • which in some cases requires different power conditions, wait times, etc.
  • Limitations on write cycles would make all extant PROMs useless for the kind of high-volume data transfer/manipulation needed by many programs.

...all of which mean that the act of writing to such memory is slow, can't be efficiently interleaved with read operations, actively wears out the chip, etc.

PROM is on a totally different league than RAM with equivalent read specs. Hence why it wasn't marketed as any form of RAM. The backlash would've been colossal!

So, we could perhaps call it Read Mostly Memory or, for the pedants, EWRPROM: Eventually Writable, Runtime Practically Read Only Memory... but in practical terms, ROM is bang on the mark.

\$\endgroup\$
3
  • 6
    \$\begingroup\$ "... writing to it in the same manner and contexts as you would with an 'equivalent' RAM is impossible." But that wasn't the OP's question and for many applications such as saving configuration settings, pages printed, etc., EEPROM is ideal, despite it's slow speed. Whatever its write speed it's still writable. \$\endgroup\$
    – Transistor
    Commented Jun 30, 2016 at 21:25
  • \$\begingroup\$ @transistor Well, just as the question is subject to semantics, so are the answers... so I'm not sure any 'one true' answer is possible. My point was that it's not 'writable' by one commonly assumed meaning of that term. That's why, as vaxquis pointed out, the alternative term programmable was introduced. I added my take since I feel this important detail had been overlooked in this thread prior to this. But sure, you're right that EEPROM suffices in appropriate cases, so thanks for the detail. \$\endgroup\$ Commented Jun 30, 2016 at 21:29
  • \$\begingroup\$ Read Mostly is a good name for it! \$\endgroup\$ Commented Nov 2, 2022 at 18:37
5
\$\begingroup\$

Early programmable memory devices were intended to be written while plugged into one device, and then read while plugged into another. While the devices could generally be read while in the programming fixture (so the programming fixture could confirm that they were written correctly), programming the devices would often require applying unusual voltages that would not be available in most devices that needed to read them. Further, write operations were orders of magnitude slower than read operations. Later devices have been enhanced to eliminate such requirements, allowing them to be programmed in the device where it will be used after programming, but the difference between read and write speeds remains.

\$\endgroup\$
2
\$\begingroup\$

I discovered a potential answer while writing the question

From looking at this ROM article on Wikipedia it sounds like some ROM's will allow writing but if it does then the write speed will be slow or writing in general will be difficult, if possible.

Another fascinating tidbit is that EEPROM has a limited amount of times it can be written to. The article mentions that the EEPROM can be wiped clean and written to thousands of times, but still!

\$\endgroup\$
6
  • 1
    \$\begingroup\$ This is an overly simplistic explanation, and fails to recognize the key differences between different types of ROM (e.g, mask ROM vs. OTP PROM vs. EPROM, EEPROM, and flash memory). \$\endgroup\$
    – user39382
    Commented Jun 30, 2016 at 15:51
  • \$\begingroup\$ @duskwuff It sounds like you have some excellent information on the topic. Please, do share. \$\endgroup\$
    – Jacksonkr
    Commented Jun 30, 2016 at 15:53
  • 2
    \$\begingroup\$ The wikipedia quote that you're referring to is a nod to all of the different types, but @Jacksonkr is right; it overly simplifies. ROM cannot be written at all. PROM can be written once. EPROM can be rewritten, but only after exposure to a UV lamp. (i.e. slowly and with difficulty.) EEPROM can be rewritten, but only after you give it a command to erase (i.e. slowly). \$\endgroup\$ Commented Jun 30, 2016 at 19:40
  • 2
    \$\begingroup\$ @RobertHarvey I think you meant "@duskwuff is right" ? \$\endgroup\$
    – Jacksonkr
    Commented Jun 30, 2016 at 19:42
  • 1
    \$\begingroup\$ [sigh] And now all the comments are messed up. \$\endgroup\$ Commented Jun 30, 2016 at 20:06
1
\$\begingroup\$

It's Electrically Erasable, so you can write to it.

It makes no sense when you expand ROM into words. But my understanding is that EPROM was so named by its inventor, Intel, as marketing enticement that meant "Just like ROM - but you can change it yourself". This was in a 1972 world where ROM meant umpteen grand for a mask change.

EEPROM follows on from that precedent.

\$\endgroup\$
4
  • 4
    \$\begingroup\$ PROM: Programmable read-only memory (not just set at the factory). EPROM: erasable programmable read-only memory. Typically requiring UV exposure to erase. EEPROM: electrically-erasable programmable read-only memory, saving a lot of time by not sitting your device in a tanning bed each time you want to reprogram it. \$\endgroup\$
    – The Photon
    Commented Jun 30, 2016 at 15:57
  • 1
    \$\begingroup\$ The UV EPROM's I have seen have little windows in the plastic. You cover them when you are not erasing. \$\endgroup\$
    – user57037
    Commented Jun 30, 2016 at 16:01
  • 2
    \$\begingroup\$ The designation of ROM makes plenty of sense when you bother to think about the practicalities, introduced in my answer, of trying to use a PROM as though it were RAM. Try it out and see. I'll wait! \$\endgroup\$ Commented Jun 30, 2016 at 20:36
  • \$\begingroup\$ @underscore_d, actually I had bothered to think and I'm not sure how your comment weighs up against your somewhat reverse-gear later one "Well, just as the question is subject to semantics, so are the answers... so I'm not sure any 'one true' answer is possible". In any event, there were very few memory types in 1972 and ROM was a distinct type. As a self-standing acronym, EEPROM is indeed confusing, as per the OPs question. \$\endgroup\$
    – TonyM
    Commented Jul 17, 2017 at 16:45
1
\$\begingroup\$

EEPROMs and even Flash memories use an evolution of the same technology (floating gate) that EPROMs use, not technology that would be used for SRAM or DRAM devices.

EEPROMs are strongly asymmetric in read vs write behaviour: Read cycles are practically unlimited, fast (tens or hundreds of nanoseconds), and always possible with only the main operating voltages applied. Write cycles are much slower and sometimes need extra voltages applied (an 2816 parallel EEPROM will need an extra 12V supply for some programming operations, and will have a write time in the hundreds of microseconds or even slower depending on the exact make and model, and have limited write cycles).

Flash memories are not random access for writing (overwriting a word requires you to erase more than a word), some types (NAND) are not even random access for reading.

Note that some (not all!) devices marketed as PROMs or ROMs were internally OTP (windowless) EPROMs.

\$\endgroup\$
0
\$\begingroup\$

It's only a ROM compared to Volatile RAM (Random Access Memory that will lose it's state once power is lost). A legacy naming that no longer makes sense after decades.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ I wouldn't agree, Passerby; the name actually makes perfect sense in the context. We have NVRAM, and we have EEPROM. Both terms highlight different expected usage modes of the memories, different read/write speeds, different data retention times etc. \$\endgroup\$
    – user20088
    Commented Jun 30, 2016 at 20:25
-1
\$\begingroup\$

EPROM/PROM is READ ONLY at RUNTIME. When you run the intended application (PC, embedded controller, etc) it can not be written to by the running program. You have to take it out and enter it into a special writing apparatus, where you write all of the contents at once.

As os being pointed out to me in the comments, EEPROM could be set up to be writeable at runtime because it is electonically writeable. But in everyday use it is not writeable, the architecture usually prevents it. Usually you use a special "flash" utility provided by the manufacturer to access and write it, and is usually written all at once rather than in a random access mode. Someone in an answer above made up a big acronym for it that would apply.

RAM, including NVRAM, can be written at runtime by the host device.

Though all ROM is non-volatile and MOST RAM is volatile, NVRAM is non-volatile so that is not the only discerning difference between them.

\$\endgroup\$
5
  • \$\begingroup\$ ROM is read-only. "You have to take it out and enter it into a special writing apparatus, where you write all of the contents at once." That's programming it so by definition that's a PROM (Programmable Read-Only Memory) device. "Runtime" does not apply. It's not a compiler. Welcome to EE.SE. \$\endgroup\$
    – Transistor
    Commented Jun 30, 2016 at 22:13
  • \$\begingroup\$ I meant EEPROM or PROM and mistakenly only wrote ROM \$\endgroup\$
    – Trashman
    Commented Jun 30, 2016 at 23:13
  • 2
    \$\begingroup\$ Still not right. EEPROM is writeable by the host device. It is commonly used to save configuration settings. See other answers on the page. \$\endgroup\$
    – Transistor
    Commented Jul 1, 2016 at 5:32
  • \$\begingroup\$ /agree transistor - iff EEPROM is designated as code area in (modified) Harvard architecture it can't be written to (as a simple result of bus design). \$\endgroup\$
    – user20088
    Commented Jul 1, 2016 at 11:09
  • \$\begingroup\$ Nope, that's backwards too. In a "modified" Harvard architecture you typically can write to code space, typically less efficiently, it is only in a pure one where you cannot. And as for the answer itself, the 8052AH basic supported using an (UV) EPROM as run-time-writable storage - you needed a 12v or so supply and a transistor to enable it. Of course it couldn't erase it in circuit, but it could keep appending saved programs until running out of space. \$\endgroup\$ Commented Sep 23, 2016 at 16:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.