Memory ICs and Electronic Memory
Electronic memory is used to store digital information inside computers, microcontrollers, embedded systems, communication equipment and consumer electronics. Memory devices range from fast temporary storage such as SRAM and DRAM to non-volatile technologies such as EEPROM and Flash memory.
What Is Electronic Memory?
Electronic memory is a semiconductor device or circuit used to store digital information.
Digital memory stores information as binary states represented by bits. A bit can normally represent:
0 1
Large groups of bits are combined to store numbers, instructions, characters, images, audio data and other information.
What Is a Bit?
A bit is the smallest basic unit of digital information.
It has two possible states:
0 = LOW 1 = HIGH
Eight bits make one byte:
8 bits = 1 byte
Memory Capacity
Memory capacity describes how much information a memory device can store.
Common units include:
- Bit
- Byte
- Kilobyte
- Megabyte
- Gigabyte
- Terabyte
In semiconductor memory, capacity is often described using the number of addressable locations and the number of bits stored at each location.
Memory Addressing
Digital memory is normally divided into addressable locations.
An address identifies which memory location the system wants to access.
Address │ ▼ ┌───────────────┐ │ Memory │ │ │ │ Location 0 │ │ Location 1 │ │ Location 2 │ │ Location 3 │ │ ... │ └───────────────┘ │ ▼ Stored data
The number of address lines determines how many unique locations can be selected.
Memory Address Lines
If a memory device has N address lines, it can select:
2^N
different memory locations.
For example, a memory with 10 address lines can select:
2^10 = 1024
locations.
Memory Data Width
The data width determines how many bits can be transferred during one memory access.
Common widths include:
- 1 bit
- 4 bits
- 8 bits
- 16 bits
- 32 bits
- 64 bits
Main Types of Memory
Semiconductor memory can broadly be divided into volatile and non-volatile memory.
| Type | Volatile? | Typical Use |
|---|---|---|
| SRAM | Yes | Cache and fast temporary storage |
| DRAM | Yes | Main system memory |
| ROM | No | Permanent data or firmware |
| PROM | No | Programmable permanent storage |
| EPROM | No | Reprogrammable firmware storage |
| EEPROM | No | Non-volatile configuration/data |
| Flash | No | Firmware and mass storage |
Volatile Memory
Volatile memory requires power to retain its stored information.
When power is removed, the stored contents are normally lost.
The two major semiconductor volatile memory technologies are:
- SRAM
- DRAM
Non-Volatile Memory
Non-volatile memory retains information when electrical power is removed.
Examples include:
- ROM
- PROM
- EPROM
- EEPROM
- Flash memory
SRAM
SRAM stands for Static Random-Access Memory.
SRAM stores each bit using a bistable circuit, typically based on a group of transistors.
It does not require periodic refresh while powered.
SRAM is generally fast but requires more silicon area per bit than DRAM.
SRAM Applications
SRAM is commonly used for:
- Processor cache
- Microcontroller RAM
- High-speed buffers
- Networking equipment
- Embedded systems
DRAM
DRAM stands for Dynamic Random-Access Memory.
A DRAM memory cell stores charge in a capacitor and uses a transistor to control access to that charge.
Because the stored charge gradually leaks away, DRAM requires periodic refresh operations.
DRAM Applications
DRAM is commonly used as main memory in computers and other systems that require relatively large amounts of RAM.
Examples include:
- Desktop computers
- Laptops
- Servers
- Embedded processors
- Graphics systems
SRAM vs DRAM
| Feature | SRAM | DRAM |
|---|---|---|
| Storage cell | Transistor-based latch | Transistor and capacitor |
| Refresh | Not required | Required |
| Speed | Generally faster | Generally slower |
| Density | Lower | Higher |
| Cost per bit | Higher | Lower |
| Typical application | Cache and fast memory | Main memory |
ROM
ROM stands for Read-Only Memory.
Traditional ROM devices contain information that is programmed during manufacturing and is not normally changed during normal operation.
ROM is non-volatile.
PROM
PROM stands for Programmable Read-Only Memory.
A PROM can be programmed after manufacturing.
Traditional PROM devices are normally programmed once and cannot be erased and reprogrammed.
EPROM
EPROM stands for Erasable Programmable Read-Only Memory.
Traditional EPROM devices can be erased using ultraviolet light and then programmed again.
EPROM packages often have a transparent window through which ultraviolet light can reach the memory array.
EEPROM
EEPROM stands for Electrically Erasable Programmable Read-Only Memory.
EEPROM can be electrically erased and programmed.
It is commonly used for storing relatively small amounts of non-volatile data.
Examples include:
- Configuration settings
- Calibration data
- Device parameters
- Serial numbers
Flash Memory
Flash memory is a type of non-volatile semiconductor memory that can be electrically erased and programmed.
Flash is widely used because it provides relatively high storage density and can be manufactured at low cost per bit.
Applications include:
- Microcontroller firmware
- USB drives
- Memory cards
- Solid-state drives
- Embedded storage
NOR Flash
NOR Flash provides random-access capabilities that make it particularly useful for storing executable firmware.
It is commonly found in embedded systems and microcontrollers.
NAND Flash
NAND Flash is optimized for high-density data storage.
It is widely used in:
- Solid-state drives
- Memory cards
- USB storage
- Embedded storage
- Mobile devices
NOR vs NAND Flash
| Feature | NOR Flash | NAND Flash |
|---|---|---|
| Typical use | Firmware | High-density storage |
| Random read access | Strong | More block-oriented |
| Density | Generally lower | Generally higher |
| Typical application | Embedded program storage | Mass storage |
Memory Access
Memory access involves selecting a memory address and transferring data between the memory device and the processor or controller.
Two important operations are:
- Read
- Write
Memory Read Operation
During a read operation, the system supplies an address and the memory returns the stored data.
CPU │ │ Address ▼ Memory │ │ Data ▼ CPU
Memory Write Operation
During a write operation, the system supplies the destination address and the data that should be stored.
CPU │ ├── Address ─────► Memory │ └── Data ────────► Memory
Memory Control Signals
Memory ICs commonly use control signals such as:
- Chip Enable
- Output Enable
- Write Enable
- Read Enable
The exact signal names and active logic levels depend on the memory device.
Chip Enable
Chip Enable, often abbreviated CE or CS, determines whether the memory IC is selected.
When the device is not selected, its outputs may be placed into a high-impedance state depending on the device.
Write Enable
Write Enable controls whether data can be written to the memory.
This signal is especially important for writable memory such as SRAM and many Flash or EEPROM devices.
Read-Only Memory vs RAM
| Feature | ROM / Non-volatile Memory | RAM |
|---|---|---|
| Power removed | Data retained | Data normally lost |
| Typical purpose | Firmware/data storage | Working memory |
| Write operation | Depends on technology | Normally supported |
| Typical examples | Flash, EEPROM | SRAM, DRAM |
Memory IC Interfaces
Memory devices can communicate with processors using several types of interfaces.
Common interfaces include:
- Parallel memory bus
- I2C
- SPI
- QSPI
- Other serial interfaces
Parallel Memory
Parallel memory uses multiple data and address lines simultaneously.
Address Bus ─────► Memory Data Bus ◄────► Memory Control ─────► Memory
Parallel interfaces can provide high data-transfer capability but require more pins and PCB connections.
Serial Memory
Serial memory transfers data using a smaller number of connections.
Common examples include:
- I2C EEPROM
- SPI Flash
Serial memory can significantly reduce PCB pin count.
I2C EEPROM
I2C EEPROM devices use the I2C bus to communicate with a microcontroller or processor.
Typical signals are:
- SDA
- SCL
External pull-up resistors are normally required on the I2C bus.
SPI Flash
SPI Flash memory uses a serial interface to transfer commands, addresses and data.
It is commonly used for:
- Firmware storage
- Configuration data
- Embedded files
- Boot data
Memory Speed
Memory performance can depend on several parameters:
- Access time
- Clock frequency
- Bus width
- Read latency
- Write time
- Interface protocol
Memory Access Time
Access time is the time between requesting a memory operation and the availability of valid data.
Lower access time generally means faster memory response.
Memory Latency
Latency is the delay before useful data becomes available after a request.
Latency is especially important in high-performance systems.
Memory Endurance
Some non-volatile memories have a limited number of erase and write cycles.
This is particularly important for EEPROM and Flash memory.
Applications that frequently update stored information should take the memory's endurance specification into account.
Flash Wear
Flash memory has a finite erase/program endurance.
Systems that frequently modify Flash data may use techniques such as:
- Wear leveling
- Data rotation
- Buffered writes
- Using dedicated EEPROM where appropriate
Memory Retention
Non-volatile memory retains information for a specified period without power.
Retention depends on the memory technology, temperature, device age and other factors.
The manufacturer's datasheet should be consulted for the specified retention characteristics.
Memory in Microcontrollers
A microcontroller normally contains several types of memory.
A typical arrangement is:
Microcontroller
│
├── Flash
│
├── RAM
│
└── Non-volatile data storage
Flash stores the firmware while RAM is used for temporary program data.
Program Memory
Program memory stores the instructions executed by the microcontroller.
Modern microcontrollers commonly use internal Flash for this purpose.
Data Memory
Data memory stores information used by the running program.
This includes variables, buffers and temporary calculations.
RAM is commonly used for this purpose.
Cache Memory
Cache memory is high-speed memory used to reduce the effective time needed to access frequently used instructions or data.
It is commonly implemented using SRAM technology.
Caches are widely used in processors and high-performance computing systems.
Memory Hierarchy
Computer systems often use multiple levels of memory with different combinations of speed, capacity and cost.
Fastest │ ▼ CPU Registers │ Cache │ RAM │ Storage │ ▼ Slowest
Generally, faster memory has higher cost per bit and smaller capacity.
Memory Testing
Memory faults can produce many different symptoms.
Testing methods depend on the type of memory.
Possible tools include:
- Digital multimeter
- Logic analyzer
- Oscilloscope
- Memory programmer
- Dedicated memory tester
- System diagnostic software
Testing an EEPROM
An EEPROM can be tested by reading its contents and comparing them with known-good data.
A programmer or compatible microcontroller interface can often be used.
Write and read verification can help identify defective devices.
Testing Flash Memory
Flash memory can be tested by:
- Reading the device identification where supported.
- Reading known memory locations.
- Programming test data where appropriate.
- Reading the data back.
- Comparing the written and read values.
The correct test procedure depends on the specific Flash device.
Memory Fault Symptoms
| Symptom | Possible Causes |
|---|---|
| System does not boot | Corrupted firmware, faulty memory or power problem |
| Random crashes | RAM fault, timing problem or software issue |
| Incorrect stored settings | EEPROM/Flash problem or corrupted data |
| Data corruption | Memory fault, noise, power instability or interface problem |
| Cannot program memory | Write protection, incorrect voltage, interface problem or damaged memory |
| Intermittent operation | Poor connection, power problem or marginal memory device |
Memory IC Troubleshooting
- Check the supply voltage.
- Check ground connections.
- Check the address lines.
- Check the data lines.
- Check chip-enable signals.
- Check read/write control signals.
- Check the clock where applicable.
- Check communication timing.
- Check for shorted or open connections.
- Compare signals with a known-good circuit or datasheet.
Memory IC Replacement
When replacing a memory IC, the replacement must be compatible with the system.
Important parameters include:
- Memory capacity
- Data width
- Addressing
- Interface
- Supply voltage
- Speed
- Timing
- Package
- Pinout
- Memory organization
Memory Organization
Memory organization is often expressed as:
Number of locations × Number of bits per location
For example, a memory described as:
4096 × 8
contains 4096 addressable locations, each containing 8 bits.
The total storage capacity is therefore:
4096 × 8 = 32768 bits 32768 bits = 4096 bytes
How to Select a Memory IC
- Determine the required capacity.
- Determine the data width.
- Determine the interface.
- Determine the supply voltage.
- Determine the required speed.
- Determine read and write requirements.
- Check endurance if the device is frequently rewritten.
- Check data retention requirements.
- Check package and pinout.
- Check compatibility with the processor or controller.
Memory IC Applications
- Microcontrollers
- Computers
- Digital cameras
- Audio equipment
- Televisions
- Routers
- Industrial controllers
- Automotive electronics
- Measurement equipment
- Communication equipment
- Embedded systems
- Consumer electronics
Advantages of Semiconductor Memory
- Small physical size
- Fast operation
- Low power options
- High reliability
- Large storage capacity
- Easy integration with processors
- Many different technologies available
Limitations of Memory ICs
- Some memory is volatile
- Flash and EEPROM have finite write endurance
- Different memory types have different interfaces
- High-speed memory requires careful PCB design
- Memory corruption can cause serious system failures
- Some obsolete memory devices can be difficult to replace
Common Memory Design Mistakes
- Using the wrong supply voltage
- Incorrect address wiring
- Incorrect data-bus connections
- Ignoring chip-enable polarity
- Incorrect read/write timing
- Ignoring Flash endurance
- Failing to provide adequate supply decoupling
- Using incompatible memory interfaces
- Incorrect memory organization
- Using an incorrect replacement device
Key Points
- Memory stores digital information.
- Memory is generally divided into volatile and non-volatile types.
- SRAM is fast and does not require refresh while powered.
- DRAM stores charge and requires periodic refresh.
- ROM is non-volatile.
- EEPROM can be electrically erased and programmed.
- Flash memory is widely used for firmware and high-density storage.
- NOR Flash is commonly used for embedded program storage.
- NAND Flash is widely used for high-density storage.
- Memory capacity depends on the number of addressable locations and data width.
- Memory devices can use parallel or serial interfaces.
- Memory endurance is important for frequently rewritten non-volatile memory.
- Microcontrollers commonly contain Flash and RAM.
- Always check capacity, interface, voltage, timing and pinout when selecting replacement memory.