Both DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory) are types of Random Access Memory (RAM). RAM is a semiconductor device internal to the integrated chip that stores the processor that a microcontroller or other processor will use constantly to store variables used in operations while performing calculations. RAM refers to the hardware that provides the memory locations referred to in software as registers. As of this writing, all commonly used RAM is volatile, which means that everything in volatile memory is lost when power is removed. You can think of RAM as working memory where variables are stored while the CPU performs calculations. RAM is much faster to access than external memory and is a critical component to the speed of the processor chip.
The architectural difference between the two is that DRAM uses transistors and capacitors in an array of repeating circuits (where each circuit is one bit), whereas SRAM uses several transistors in a circuit to form one bit.
DRAM stores data by “writing a charge to the capacitor by way of an access transistor” and was invented in 1966 by Robert Dennard at IBM and was patented in 1967. DRAM looks at the state of charge in a transistor-capacitor circuit (see Figure 1); a charged state is a 1 bit; the low charge is seen as a 0 bit.
Several of these transistor-capacitor circuits together creates a “word” of memory. (See Figure 2).
DRAM uses capacitors that lose charge over time due to leakage, even if the supply voltage is maintained. Since the charge on a capacitor decays when a voltage is removed, DRAM must be supplied with a voltage to retain memory (and is thus volatile). Capacitors can lose their charge a bit even when supplied with voltage if they have devices nearby (like transistors) that draw a little current even if they are in an “off” state; this is called capacitor leakage. Due to capacitor leakage, DRAM needs to be refreshed often.
SRAM does not use capacitors. SRAM uses several transistors in a cross-coupled flip-flop configuration and does not have the leakage issue and does not need to be refreshed.But SRAM still needs constant power to maintain the state of charge and thus is volatile like DRAM. Since SRAM uses several transistors (see Figure 3) per bit of memory versus DRAM, which uses one transistor and capacitor per bit, DRAM is less expensive. DRAM uses a different process than SRAM, so discussing size is an apples-to-oranges comparison in some respects, depending upon the optimization goal. DRAM is at least ten times slower than SRAM. SRAM is faster and typically used for cache, DRAM is less expensive and has a higher density and has a primary use as main processor memory.
SDRAM stands for Synchronous Dynamic Random Access Memory, a type of DRAM that is synchronized with the processor system bus for a speed advantage.