One of the main components of microcontrollers and computers is memory. In a single machine, there are several types of memory.

Examples of memory are Random Access Memory (RAM), Hard Drive, Solid State Drive (SSD) and Read-Only Memory (ROM).

Today’s topic is about ROM. As the name say, this memory is for things or programs that do not change so often. Unlike RAM,  ROM memory contents does not lose contents when power is switched off.

In this post I would like to talk about the types of ROM.

What does ROM do anyway?

In PCs, startup firmware  is saved in ROM. This boot firmware is called the basic input/output system (BIOS). So when PC is switched on, BIOS instruct the computer to load the operating system into RAM.

For smaller devices which use microcontroller, programs are saved in ROM. Sometimes ROM holds some variables for the convenience of programs.

In the past ROM used to be very difficult to erase or edit contents. Nowadays you only need to apply voltage into one of its pins to edit part of the content.

Next I will discuss about types of ROM.

Programable ROM (PROM):

This type can be programmed by the user. For every bit of data there is a fuse. The fuse is burned once PROM is programmed. So if you program it wrongly the fuse are burned and the ROM must be thrown away. This is why PROM is called One-Time Programmable (OTP) or burning ROM. You need a special equipment called ROM burner or ROM programmer to program PROM.

Erasable PROM (EPROM) & UV-EPROM:

EPROM was invented to allow for editing the contents of the chip. This is very useful n development phase. You can also erase and reprogram thousands of times. One of the main types of EPROM is UV-EPROM. UV comes from Ultra Violate. You can erase the contents of UV-EPROM when you shine UV light in the special window of the chip. The problem of this process is that it takes around 20 minutes to erase contents.

You can use the ROM burner to program UV-EPROM, but you will also need an eraser. When you program UV-EPROM, first take out the chip from the board and erase the contents with UV-EPROM eraser, second program chip using ROM burner then place the chip back in board. Which means you cannot erase contents while the chip is setting on the system.

For such inconvenience EEPROM was invented.

Electrically Erasable Programmable ROM (EEPROM):

The following table compares EEPROM with UV-EPROM. The main feature of EEPROM is that you can electrically erase contents which is much easier than UV light.

 EEPROMUV-EPROM
Erasure timeErasure is instant20 minutes
Erasure scaleOne can select specific byteAll contents must be erased
ConvenienceCan be erased while still on the boardMust be physically removed to erase
MethodDesigner must integrate the erasure and programmer circuitry in the boardRequires an erasure and programmer devices externally
CostCost per bit is much higher 

 Summary

In this post I talked about what is ROM and its use cases then I briefly talked about PROM, EPROM and EEPROM. There are also Flash memory EPROM and Mask ROM which are also used in market.

Resources

www.techtarget.com

ARM Assembly Language Programming & Architecture by Muhammad Ali Mazidi, Sarmad Naimi, Sepehr Naimi and Shujen Chen. Chapter 0.