19

Electrically Erasable Programmable Read-Only Memory (EEPROM):

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

user2943160
  • 2,878
  • 1
  • 17
  • 32
Jacksonkr
  • 711
  • 2
  • 8
  • 16
  • 14
    Does the word "programmable" hint at anything? – Nick Alexeev Jun 30 '16 at 15:47
  • 2
    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. – StainlessSteelRat Jun 30 '16 at 15:52
  • 9
    'Programmable' will not hint at anything if followed by the non-hint 'read-only'. – TonyM Jun 30 '16 at 15:57
  • 4
    @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. – The Photon Jun 30 '16 at 15:59
  • @Photon, the erasable-programmable thing does make sense when seen as a progression from 'EPROM' and the windowed parts that were all that was about in the late 1970s when EEPROM came about. It's pretty clear though that the names given to these different memory types aren't literal definitions of them, just something unique to distinguish them. The rough with the smooth and all that :-) – TonyM Jun 30 '16 at 18:44
  • 3
    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. –  Jun 30 '16 at 20:22
  • @vaxquis Right? I dunno how it's taken so long for this simple idea to reach this thread. I've written an answer around the same time as your comment, elaborating on the main reasons I can think of that ROM is, practically, a **very** accurate term. – underscore_d Jun 30 '16 at 20:39
  • 1
    For an even funnier competition in oxymorons and redundancy, see **OTP-EPROM**. **O**ne-**T**ime **P**rogrammable **E**raseable **P**rogrammable **R**ead-**O**nly **M**emory. – pipe Jul 10 '16 at 05:03
  • @pipe well, it _is_ erasable, if you have UV light and are very good with a chisel ;-) – underscore_d Jul 10 '16 at 15:41

8 Answers8

31

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.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • 1
    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](http://security.stackexchange.com/a/99911/116250) that you may be interested in. – Jacksonkr Jun 30 '16 at 17:13
  • 2
    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'! – Neil_UK Jun 30 '16 at 17:17
  • 4
    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. – Richard Crowley Jun 30 '16 at 17:27
  • 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. – underscore_d Jun 30 '16 at 20:37
  • 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. – old_timer Jun 30 '16 at 21:17
  • Guys, let's not lose the plot here. OP just wanted to know why it's _called_ ROM when, in fact, it's writable. I think he's got the idea by now. – Transistor Jun 30 '16 at 21:22
  • It still seems a misnomer to call it read only in my opinion, but with the context you provided I now understand the rationale. Great answer. – Hack-R Jul 16 '17 at 17:32
9

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.

underscore_d
  • 251
  • 1
  • 8
  • 6
    "_... 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. – Transistor Jun 30 '16 at 21:25
  • @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. – underscore_d Jun 30 '16 at 21:29
  • Read Mostly is a good name for it! – user253751 Nov 02 '22 at 18:37
5

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.

supercat
  • 45,939
  • 2
  • 84
  • 143
2

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!

Hack-R
  • 133
  • 7
Jacksonkr
  • 711
  • 2
  • 8
  • 16
  • 1
    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). –  Jun 30 '16 at 15:51
  • @duskwuff It sounds like you have some excellent information on the topic. Please, do share. – Jacksonkr Jun 30 '16 at 15:53
  • 2
    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*). – Robert Harvey Jun 30 '16 at 19:40
  • 2
    @RobertHarvey I think you meant "@duskwuff is right" ? – Jacksonkr Jun 30 '16 at 19:42
  • 1
    *[sigh]* And now all the comments are messed up. – Robert Harvey Jun 30 '16 at 20:06
  • The issue of "a limited amount of times it can be written to" lacks context. That's true for Flash memory and most types of memory. According to UC Irvine Prof. Ian Harris (in his Coursera course on Arduino) the distinguishing characteristic of EEPROM is that it can be written to *many more times* than Flash and comparable forms of memory. So while what you said was technically accurate, the interpretation was backwards. – Hack-R Jul 16 '17 at 17:37
1

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.

TonyM
  • 21,742
  • 4
  • 39
  • 62
  • 4
    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. – The Photon Jun 30 '16 at 15:57
  • 1
    The UV EPROM's I have seen have little windows in the plastic. You cover them when you are not erasing. – user57037 Jun 30 '16 at 16:01
  • 2
    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! – underscore_d Jun 30 '16 at 20:36
  • @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. – TonyM Jul 17 '17 at 16:45
1

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.

rackandboneman
  • 3,085
  • 9
  • 13
0

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.

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • 3
    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. –  Jun 30 '16 at 20:25
-1

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.

user2943160
  • 2,878
  • 1
  • 17
  • 32
Trashman
  • 309
  • 2
  • 10
  • 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. – Transistor Jun 30 '16 at 22:13
  • I meant EEPROM or PROM and mistakenly only wrote ROM – Trashman Jun 30 '16 at 23:13
  • 2
    Still not right. EEPROM is writeable by the host device. It is commonly used to save configuration settings. See other answers on the page. – Transistor Jul 01 '16 at 05:32
  • /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). –  Jul 01 '16 at 11:09
  • 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. – Chris Stratton Sep 23 '16 at 16:30