Memory in Embedded Systems
Memory in Embedded Systems
(Simplified)
• Memory is a very important part of an embedded system with a processor or controller.
• 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.
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.
Example: Main memory in computers, external RAM for embedded systems with OS.
In embedded systems, memory can also be classified based on how it connects to the processor or controller. This is called the
interface type.
• 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.
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?
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.
Choosing the right memory is crucial when designing an embedded system. The selection depends on various technical and
application-specific factors.
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.
• If fewer processor pins are available: prefer serial memory (I²C, SPI).
• If speed is critical: prefer parallel memory.
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)
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