Volatile memory is memory used for the temporary storage of data. It does not need to maintain its state
when power is removed. Data can be accessed randomly; that is, any memory cell can be directly addressed.
This memory is referred to as RAM (Random Access Memory). There are two common types of RAM memory, SRAM
and DRAM.
SRAM
SRAM (Static RAM) is RAM that can be programmed and read any number of times as long as power is
applied. A single bit in an SRAM cell typically uses four, six, or eight transistors to control access
to the cell, provide read and write abilities, and maintain the cell state of a 1 or 0. SRAM is easy to
use both from a hardware and a programming standpoint. An SRAM memory chip just needs power and ground
to keep its state. Separate address and data buses are used to read and write data, with one or more
chip selects used as control signals.
Some specialty SRAM chips use an SPI interface. These are useful for modifying existing systems where
additional SRAM is required, a pin-compatible replacement to upgrade the existing SRAM is design
limited, and redesigning the circuit board is impractical.
DRAM
Another type of RAM is called DRAM, or Dynamic RAM. As compared to SRAM, a DRAM memory cell can be only
one transistor with a capacitor. This has the advantage of making the memory matrix very dense,
providing low-cost RAM with very high capacity. The chief disadvantage of DRAM is that if left alone,
the memory state in the cell dissipates over time. For that reason, DRAM memory must be refreshed on a
regular basis to prevent the memory cell state from dissipating. This refresh is accomplished by
regularly reading the memory cells. In order to do this a separate circuit performs regular reads of the
cells to keep them from losing their state. Like SRAM, DRAM loses its state when power is completely
removed from the chip.
For modern desktop and laptop computers, the amount of DRAM is measured in Gigabytes. DRAM is inserted
into computers in small circuit boards called DIMMs or SIMMs.