The basic operation of memory is described in the pages on the Dispatch Unit.

These pages describe the various types of memory. Memory inside a computer is organised in a matrix of rows and collums. Each word of memory (or location as it is often caleld) is uniquely identified by the combined row and column values - known as the address. This arrangement resembles a set of pigeon holes used to sort post. Each item of post has an assigned address, which indicates the pigeon hole into which it is to be placed:

For instance to read the value stored at a memory location 4, the following steps of actions are performed:
(i) Set the memory address value to 4 to indicate that we are going to deal with the 4th memory location
(ii) Set the memory control logic to READ (enables the memory)
(iii) The data register returns the value at the location specified by the memory address (e.g. 23 in this example)
(iv) DISABLE the memory control logic

Types of memory

There are two basic kinds of memory used in microprocessor systems - commonly called ROM and RAM, but better called ROM and RAM - "Read Only Memory" and "Random Access Memory". The program may be stored in ROM or RAM - the program does not normally change while it executes - while data is stored in the registers and RAM. Of course, if you turn off the chip and turn it on again, you have lost all the contents of the registers, and RAM.

In a typical computer , as much as possible is in RAM, to give the maximum possible flexibility; you have basic programmes allowing you to interact with discs, keyboards and the display in ROM, and load in as much of the software as possible when you run the programs.


Random Access Memory (RAM) is used for storing most programs and data in a computer. Most computers also use some Read Only Memory (ROM) or Erasable-Programmable Read Only Memory (EPROM). This stores programs (or libraries of procedures) which do not need to be changed. (This usually includes the program that is executed when the computer is first turned on, and the procedures required to access permanently connected peripherals - such as the keyboard, display, disk drive, ...).

Static RAM is composed of D-Type Flip-Flops, and is extremely fast, however it is also expensive. It is therefore usually reserved for applications requiring a high speed (such as graphics display memory or cache memory. The main computer memory is usually formed from Dynamic RAM (DRAM), which uses an array of capacitor storage elements. Although slower than SRAM it is also much cheaper.


There are a number of different types of ROM; the cheapest, when produced in very large quantities, is "Masked ROM", often just called ROM. Here the individual voltages (bits) are fixed high or low when the chip is made, and cannot be altered; they are determined by the pattern of connections in the mask used to make the chip.

The diagram below gives an idea of the implementation of a ROM. The outputs of the open-drain transistors are logic '0' (when selected by a logic '1' on the 'word line') only if their source terminals are grounded when the ROM is program is created in silicon ­ other wise logic '1' is maintained by a pull-up resistor.

Producing a mask for ROM is quite expensive; it is justifiable if you have a large production run, say of many 10,000s.


Another type of ROM is programmable (PROM). The pattern of 0 and 1 values of bits can be determined after production, usually by selectively applying high voltages to some of the memory locations. The contents of program memory area is only fixed after manufacture (it can be done by sending voltages in through two of the pins in the correct sequence).

Some devices are made with EPROM - this stands for "Erasable Programmable Read Only Memory" This means that there is a quartz window which allows you to illuminated the chip with UV radiation, which puts the chip back into its original state, and allows fresh programming. PROMs and EPROMs are very similar inside, but only some of them have a window to allow you to erase the pattern. So some are OTP - "One Time Programmable" - and these are cheaper.


In some applications, it is desirable to store data for long periods of time, but to allow the data to be erased as and when required. Examples include the configuration of the disks connected to a computer, the network name, operating system password. This could be done by using RAM, and providing a back-up battery which kept the RAM powered when the main computer power supply is turned off. Some RAM chips require very little power when the data is not being accessed and this is sometimes the chosen approach. Two other types of memory may also be used which require no power supply to retain their data. They have the advantage that the memory chip may actually be removed from the computer without loss of data.

The first type of memory is Electrically Erasable EPROM, EEPROM. Standard EPROM can be thought of as series of 'potential wells' into which electrons can be forced (over the SiO2 barrier) by applying bias (see the left hand diagram below); electrons can only be ejected from the wells by strong UV light applied through the PIC's erasure window. In EEPROM, the SiO2 barrier is thin, and electrons can 'tunnel' through it.

FLASH memory is often used to store programs and data, it too can be re-programmed and is often packaged for computers in PCMCIA cards (about the size of a credit card). Smaller FLASH memory cards are frequently used in such items as digital cameras.

Micro-Controller Memory

Micro-controllers are usually used for a single application, and in contrast to general purpose computers usually execute only a single program for the entire life. In this case, the program is usually also stored in ROM. Most microcontrollers contain an in-built EPROM or ROM. The latter allows them to be programmed and re-programmed. This type of microcontroller is often to be found in laboratories were software is being developed. The contents of the memory is "erased" by exposing the "window" on top of the chip to strong ultra-violet light. This erases all data in the chip (it can not be used to erase a single byte), but allows the entire chip to re-programmed.

See also:

EG2069 Home Page

Author: Gorry Fairhurst (Email: