0% found this document useful (0 votes)
6 views6 pages

Memory in Embedded Systems

Memory in embedded systems is crucial for storing program code and temporary data, with types including ROM for permanent storage and RAM for temporary data. ROM types include masked ROM, PROM, EPROM, EEPROM, Flash, and NVRAM, while RAM types include SRAM, DRAM, and NVRAM. Memory selection depends on factors like processor type, application needs, performance, cost, and interface requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Memory in Embedded Systems

Memory in embedded systems is crucial for storing program code and temporary data, with types including ROM for permanent storage and RAM for temporary data. ROM types include masked ROM, PROM, EPROM, EEPROM, Flash, and NVRAM, while RAM types include SRAM, DRAM, and NVRAM. Memory selection depends on factors like processor type, application needs, performance, cost, and interface requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

What is Memory in Embedded Systems?

(Simplified)
• Memory is a very important part of an embedded system with a processor or controller.

memory is used to:

• Store program code


• Hold data temporarily during operations

• Some processors have built-in memory inside the chip — this is called on-chip memory.
• Other processors don’t have internal memory, so they need external memory — this is called off-chip memory.

Program Storage Memory in Embedded Systems(ROM)

• This is the memory used to store the program (control algorithm) in embedded systems. The processor or controller reads
instructions from this memory to perform tasks.
• It is a type of non-volatile memory, meaning it does not lose data when power is turned off. It is mainly used to store
permanent code or firmware.
Memory Type Description
Masked ROM This is a factory-programmed memory. The program is permanently written during
(MROM) manufacturing and cannot be modified or erased. It is very cheap for mass production but
inflexible. Used when the code will never change.
PROM /OTP PROM is blank when manufactured and can be programmed only once by the user using a
(Programmable ROM) special device. After programming, it cannot be changed. Suitable for applications with fixed
code.
EPROM (Erasable EPROM can be erased using UV light and then reprogrammed. The chip has a small quartz
Programmable ROM) window to expose it to UV. It must be removed from the circuit for erasing and
reprogramming. Used for development and testing.
EEPROM (Electrically EEPROM is a reprogrammable memory that can be erased and written electrically. It
Erasable PROM) supports byte-level access, meaning individual bytes can be updated. Used to store device
settings or calibration data.
Flash Memory Flash memory is a type of EEPROM but faster and more efficient. It is erased and written in
blocks or sectors. It is widely used in embedded systems to store program code and data.
Comes in NOR (for code execution) and NAND (for storage) types.
NVRAM (Non-Volatile NVRAM behaves like RAM but retains data even when power is off, usually with a battery
RAM) backup or using special non-volatile technology. Used to store critical data like system state,
logs, or configuration.

Working Memory (RAM) in Embedded Systems

RAM (Random Access Memory) is used to store data temporarily while the embedded system is running. Unlike ROM, RAM
is volatile — it loses data when power is off.

RAM is essential for:

• Holding temporary variables


• Stack operations
• Buffers
• Runtime data during program execution

Types of RAM (from your source)

1. Static RAM (SRAM)

• Uses flip-flops to store each bit.


• Retains data as long as power is supplied.
• Fast access speed
• No need to refresh like DRAM.
• Expensive and low-density (stores less data per chip).
• Typically used in cache memory or on-chip RAM in microcontrollers.

Example: Internal RAM of microcontrollers, CPU cache.

2. Dynamic RAM (DRAM)

• Stores data using capacitors.


• Needs constant refreshing to retain data.
• Cheaper and higher capacity than SRAM.
• Slower than SRAM.
• Mostly used as external memory in systems that need large RAM.

Example: Main memory in computers, external RAM for embedded systems with OS.

3. Non-Volatile RAM (NVRAM)

• Combines the speed of RAM with the non-volatility of ROM.


• Retains data even when power is off, often using battery backup.
• Used to store critical data that must be preserved after shutdown
SRAM DRAM
Static Random Access Memory Dynamic Random Access Memory
Stores data using flip-flops Stores data using capacitors
Does not need refreshing Needs continuous refreshing
Faster in speed Slower compared to SRAM
More expensive Less expensive
Lower storage density (less data per chip) Higher storage density (more data per chip)
Used in cache memory and on-chip memory Used as main memory or external RAM
Consumes less power (small memory size only) Consumes more power due to refresh
Physically larger per bit Physically smaller per bit

Memory Based on Interface Type in Embedded Systems

In embedded systems, memory can also be classified based on how it connects to the processor or controller. This is called the
interface type.

There are mainly two types:

1. Parallel Interface Memory

• In this type, multiple data lines are used (e.g., D0 to D7 for 8-bit data).
• Data is transferred all at once, one byte or word at a time.
• Requires more pins and more I/O lines on the processor.
• Faster data transfer because multiple bits move together.
• Used when speed is more important than saving space.

Example: Parallel EEPROM, SRAM, older Flash memory chips.


2. Serial Interface Memory

• Data is transferred bit by bit over fewer lines.


• Needs fewer pins (saves space and cost).
• Slower than parallel interface but simpler design.
• Ideal for systems with limited I/O pins.
• Often used in low-speed or small-memory applications.

Example: I²C EEPROM, SPI Flash memory, serial NVRAM.


Interface Type Data Transfer Speed Pins Required Examples
Parallel Interface Multiple bits at once Fast More SRAM, Parallel
EEPROM
Serial Interface One bit at a time Slower Fewer SPI Flash, I²C
EEPROM

Memory Shadowing in Embedded Systems

What is Memory Shadowing?

Memory shadowing is a technique where the contents of slower memory (like ROM) are copied into faster memory (like
RAM) during system startup or booting.

Why is it used?

• Accessing RAM is much faster than accessing ROM.


• Once the ROM content (usually firmware or BIOS) is copied to RAM, the system can run much faster.
• It improves overall system performance.

How it works:

1. At boot time, the system copies the program from ROM into RAM.
2. After copying, the CPU executes the program from RAM.
3. This gives the speed of RAM while retaining the stability of ROM.

Key Points from Your Textbook Images:

• Shadowing allows executing ROM code from faster memory.


• ROM is non-volatile and used to store permanent programs.
• RAM is volatile but faster, hence useful for execution.

Memory Selection for Embedded Systems

Choosing the right memory is crucial when designing an embedded system. The selection depends on various technical and
application-specific factors.

1. Based on Type of Processor/Controller

• If the microcontroller or SoC has built-in memory:


o You may not need external memory.
• If the controller has limited or no memory, you’ll need to add external memory (off-chip).

2. Based on Application Needs


Ask:

• Does the system need to store only small firmware?


• Does it require large data buffers, like in image/audio processing?
• Will it need read/write memory, or just read-only program storage?

3. Based on Performance

• For speed-critical systems, use fast memory like SRAM or NOR Flash.
• For high-density storage, use DRAM or NAND Flash.

4. Based on Cost and Power

• Use low-cost memory in consumer devices.


• Use low-power memory in battery-operated embedded systems.

5. Based on Interface Requirements

• If fewer processor pins are available: prefer serial memory (I²C, SPI).
• If speed is critical: prefer parallel memory.

Key Parameters to Consider:


Parameter Description
Size How much memory is needed (in KB/MB)?
Type ROM (for code), RAM (for working data), EEPROM, etc.
Speed How fast must data be read/written?
Interface Parallel or Serial (SPI, I²C)?
Non-volatility Should it retain data after power-off?
Cost & Availability Budget and ease of sourcing the memory
Power Consumption Important for portable/battery-powered systems
Environment Must it work in industrial or rugged environments?

SENSORS
What Are Sensors?
• Sensors (also called detectors) are devices that detect changes in the environment or system variables.
• They are usually connected to the input port of an embedded system.
Function:
• Sensors act as transducers — they convert one form of energy into another for a specific purpose.
Example:
• In an ECG machine, sensors (electrodes) are attached to the patient's body.
• They monitor heartbeat status but do not control it.
• The variations detected by the sensors are shown on a display or printed chart.
ACTUATORS
What Are Actuators?
• An actuator is a type of transducer that converts electrical signals into physical actions.
• It acts as an output device.
When Are They Used?
• If an embedded system is designed to control something (like motor speed, valve position), it uses actuators to perform the
action.
• If the system is only for monitoring, actuators are not needed.
Multi-turn Actuator
What is it?
A multi-turn actuator is a type of actuator that provides rotational movement — it turns a valve or similar device for more than
one full revolution (360°).
It converts electrical signals from the embedded system into mechanical rotary motion to control something like a valve.
Part-Turn Actuator
What is it?
A Part-Turn Actuator is an actuator that provides rotary motion but only for less than one full revolution (i.e., less than 360°).
It is used to open or close valves that need to turn just a little — not fully rotate.
Linear Actuator
What is it?
A Linear Actuator is a device that converts electrical signals into straight-line (linear) motion, instead of rotary movement.
So instead of rotating like a motor, it pushes or pulls in a straight direction.

• Types of Actuators

Type Description
Multi-turn Produces torque for at least one full rotation. Withstands thrust. Used in gate valves.
Actuator
Part-turn Produces torque for less than one full rotation. Cannot withstand thrust. Used in
Actuator butterfly valves, ball valves.
Linear Actuator Produces linear motion (up/down or forward/backward). Used in control valves like
pressing a plug into a seat.
The I/O Subsystem in Embedded Systems
What is the I/O Subsystem?
The I/O (Input/Output) Subsystem is the part of the embedded system that connects it to the outside world. It allows the system to
receive input (like sensor data) and send output (like signals to actuators).

Why is it Important?
• The I/O subsystem lets the embedded system sense and control the environment.
• Without I/O, the system would not know what’s happening around it or be able to respond.

How It Works:
1. Sensors are connected to the input ports.
2. Actuators are connected to the output ports.
3. Input signals are often analog, so they pass through:
o Signal conditioning units
o ADC (Analog to Digital Converters)
4. The embedded system processes the signal and may output a response.
5. Output signals may go through:
o DAC (Digital to Analog Converters)
o Drivers (to control power to actuators)

Components of the I/O Subsystem:


Component Function
Sensors Detect and send real-world signals to the system
Signal Conditioning Amplifies or filters signals from sensors
ADC (Analog to Digital Converter) Converts analog signals to digital for processing
Processor/Controller Processes input and decides output
DAC (if needed) Converts digital output to analog signals
Actuators Perform actions based on system output

COMMUNICATION INTERFACES in Embedded Systems


Communication interfaces help an embedded system (E.S.) to interact with internal subsystems and the external world.
These interfaces are categorized into two types:

1. Onboard (Device/Board Level) Communication Interface


Used for communication between internal components of an embedded product (like microcontroller and memory/peripherals).
Examples:
• I²C
• 1-Wire
• Parallel Bus Interface

I²C (Inter-Integrated Circuit) Bus


• A two-wire, synchronous, bi-directional, half-duplex serial bus.
• Developed by Philips in the 1980s for connecting microcontrollers and chips in TVs.
Features:
Line Function
SCL Serial Clock Line — provides synchronization pulses
SDA Serial Data Line — transfers data between devices
• Supports multi-master configuration.
• Master device: starts/stops communication, sends data, and generates clock signals.
• Slave device: responds to master’s commands.
• Both master and slave can act as transmitter or receiver.
• Shared bus: multiple I²C devices can be connected.

2. External (Product Level) Communication Interface


Used for communication between the embedded system and external systems or modules.
It can be:
• Wired or Wireless
• Serial or Parallel
Examples:
• Infrared (IR)
• Bluetooth (BT)
• Wi-Fi (Wireless LAN)
• RF (Radio Frequency)

Infrared (IR) Communication


• A wireless, serial, half-duplex, line-of-sight technology.
• Common in TV and AC remotes.
• Uses infrared light (a part of the electromagnetic spectrum) to transmit data.
Features:
• Supports point-to-point and point-to-multipoint communication.
• Range: 10 cm to 1 meter (can increase with power).
• Data rate: 9600 bps to 16 Mbps.

Summary Table:
Type Scope Examples Medium
Onboard Communication Internal component-level I²C, 1-Wire, Parallel Bus Wired (serial/parallel)
External Communication System-to-system level IR, Bluetooth, Wi-Fi, RF Wired or Wireless

You might also like