Read-only memory (ROM) is just that: memory that can only be read from, not written to. Some forms are can be written, but only by using special tools.
This goes all the way back to the dawn of semiconductor technology. This is basically one big lookup table that is designed into the chip. As such there is no programmability once the chips are made. To change the contents, the circuit is changed and new chips are manufactured. This has several downsides:
- It is only financial feasible to do in large quantities.
- Any updates involve a product recall/update/return.
- Time from design to part is long due to the manufacturing timeline.
- Unusable for experimenting or small batches.
The circuit involved has several input lines, typically decoded from a binary encoded address, and whatever number of output lines are required, The input lines are connected to the output lines, or not, by a diode to encode the data at each address. The following is a small, simple implementation of ROM. It's not a mask ROM, but is an implementation of the same approach. The 74154 is an 8-to-16 decoder, much like the 3-to-8 decoder we saw in an early part of this guide (the 74138). Only the first few (of 16) addresses are shown, for brevity. The output corresponding to the address A (bottom left) goes low, while the rest remain high. The pullups at the top ensure that outputs are normally high. When an output of the '154 goes low (its address is on the A inputs and the /CS input is low) any output line connected to it through a diode goes low. In this way we can read the byte at any of the 16 locations. Note the inverters on the output lines, this negates the sense of the bits, resulting in a 1 wherever there is a diode. For example, at address 0 (the '154 output labelled "1") the data is 11011011.
Invented in 1956, this is also known as PROM. It is a ROM technology that can be written to once, and only once. It's basically like the above diode ROM, but with a fuse at each intersection. During programming, an address is selected and the desired data is placed on the data lines. Then a higher than normal voltage pulse is applied (generally through a special purpose pin) to blow the fuses where the data (at the selected address) should be a 0. Once a fuse is blown, that's it... there's no going back.
Of historical note, Steve Wozniak used PROMs in his inspired floppy disk controller for the Apple ][ to, along with some clever programming, avoid most of the hardware a typical disk controller at the time contained.
One disadvantage of PROMs is that you only get to program them once. The practical effect of this is that if you need to change what's programmed onto a one, you throw it away and program a new one. So, like mask ROMs, they're still not the greatest for iterating on a design. You can replace them quickly as long as you have them on hand, but each time means paying for a new chip.
Enter the Eraseable Programmable ROM, aka the EPROM. This was a huge jump forward in that it could be erased and reprogrammed. The EPROM as developed at Intel in 1971, by Dov Frohman. Interestingly development of the EPROM got its start with the investigation of faulty ICs. The engineers found that some transistor gate connections accumulated a charge that changed their properties.
EPROMs are programmed in a way very similar to PROMs: select an address, supply the data to be stored there, and pulse a write line with a high voltage. The difference is that instead of blowing a fuse, programming a bit on an EPROM causes electrons (i.e. a charge) to build up on the gate of selected (via the address and data supplied) transistors. When the write pulse is done, those electrons are trapped, storing the programmed data for decades if protected from light. The data can be read any number of times without effecting the stored charge.
Now the bit about being erasable. It turns out that exposing the chip to UV light in the right conditions will cause the charges stored during programming to dissipate. I remember using EPROM erasers that were basically little tanning beds for chips. To make this workable, EPROMS have a clear window over the actual chip. Once programmed that window needs to be covered with a UV opaque sticker.
EPROMs can be erased and programmed several thousand times before wear and tear makes the chip unreliable.
This was an incredibly useful and popular technology for quite some time, and anyone that was doing computer design/hacking of any sort had a EPROM eraser and programmer. An note on that last bit: EPROMS had to be removed from their circuit before being erased (for physical reasons) and programmed (for electrical reasons). I'm toying with the idea of building an EPROM eraser and programmer for a future project guide.