Embedded Systems - 5
Embedded Systems - 5
AND IoMT
Ms. S. Indu
AP / BME
Memory selection for Embedded Systems:
• Memory performance and capacity requirement for low cost systems are
small, whereas memory throughput can be the most critical requirement in a
complex, high performance system.
Random Access Memory
• RAM, which stands for Random Access Memory, is the computer's short-
term memory.
• Random Access memory is present on the motherboard.
• It's where data is stored for quick access by the central processing unit
(CPU) as it's working on programs and tasks.
• RAM can help in both Read and write.
• RAM is a volatile memory, which means, it is present as long as the
Computer is in the ON state, as soon as the computer turns OFF, the
memory is erased.
How does it work ?
RAM is constructed of small transistors and capacitors, much like CPUs and
other computer components, which can stored an electric charge that
corresponds to data bits. electrical charge is necessary to regular charge of it.
If not, the data removed from RAM and the capacitors lose their charge.
• Data Loading: When you turn on your computer and open a program, the
required data and instructions are retrieved from your storage device (like a
hard disk drive or solid-state drive) and loaded into RAM. This data
transfer might involve the operating system, application files, and any
documents you're working on.
• Storage and Access: RAM stores this data using memory cells, each
containing a tiny electrical circuit. These cells can be quickly accessed by
the CPU in any order (random access), unlike storage devices where data
retrieval might take longer due to physical mechanics.
• Reading and Writing: The CPU can both read data from RAM (to
understand instructions and process information) and write data to RAM
(for making changes to documents or program states). This constant
reading and writing allows the CPU to work efficiently.
• Refreshing (DRAM only): In the case of the most common type of RAM,
Dynamic RAM (DRAM), these memory cells use capacitors to store data.
However, capacitors gradually lose their charge over time. To prevent data
loss, DRAM employs a refresh process that periodically recharges the
capacitors, ensuring the information remains intact.
• Volatility: Unlike storage devices designed for permanent data retention,
RAM is volatile. This means that when you shut down your computer, the
electrical charge in the memory cells dissipates, and all the data stored in
RAM is erased.
Key characteristics of RAM:
Characteristics of SRAM
• SRAM is used as the Cache memory inside the computer.
• SRAM is known to be the fastest among all memories.
• SRAM is costlier.
• SRAM has a lower density (number of memory cells per unit area).
• The power consumption of SRAM is less but when it is operated at higher
frequencies, the power consumption of SRAM is compatible with DRAM.
2. DRAM (Dynamic Random Access memory)
• DRAM is used for the Main memory, it has one transistor and one
capacitor (also known as a conductor), which is needed to get recharged in
milliseconds due to the presence of the capacitor.
• Dynamic RAM was the first sold memory integrated circuit.
• DRAM is the second most compact technology in production (First is Flash
Memory).
• DRAM has one transistor and one capacitor in 1 memory bit.
• Although DRAM is slower, it can store more bits per chip, for instance, for
the same amount of memory stored in SRAM, DRAM requires one less
chip. DRAM requires less power and hence, less heat is produced.
Function of DRAM
The function of DRAM is that it is used for programming code by a computer
processor in order to function. It is used in our PCs (Personal Computers).
Characteristics of DRAM
• DRAM is used as the Main Memory inside the computer.
• DRAM is known to be a fast memory but not as fast as SRAM.
• DRAM is cheaper as compared to SRAM.
• DRAM has a higher density (number of memory cells per unit area)
• The power consumption by DRAM is more.
Types of DRAM
• SDRAM: Synchronous DRAM, increases performance through its pins,
which sync up with the data connection between the main memory and the
microprocessor.
• DDR SDRAM: (Double Data Rate) It has features of SDRAM also but with
double speed.
• ECC DRAM: (Error Correcting Code) This RAM can find corrupted data
easily and sometimes can fix it.
• RDRAM: It stands for Rambus DRAM. It used to be popular in the late
1990s and early 2000s. It has been developed by the company named
Rambus Inc. at that time it competed with SDRAM. It’s latency was higher
at the beginning but it was more stable than SDRAM, consoles like
Nintendo 64 and Sony Play Station 2 used that.
• DDR2, DDR3, AND DDR4: These are successor versions of DDR
SDRAM with upgrades in performance.
Advantages of Using RAM
• Speed: RAM is faster than other types of storage like ROM, hard drives or SSDs,
allowing for quick access to data and smooth performance of applications.
• Multitasking: More RAM allows a computer to handle multiple applications
simultaneously without slowing down.
• Flexibility: RAM can be easily upgraded, enhancing a computer’s performance and
extending its usability.
• Volatile Storage: RAM automatically clears its data when the computer is turned off,
reducing the risk of unwanted data accumulation.
Applications of ROM:
• System Startup (BIOS): Stores instructions for hardware initialization and
system startup.
• Device Firmware: Contains permanent software code for controlling
specific devices like printers or graphics cards.
• Program Loaders: Holds instructions for loading the operating system
from storage devices.
• Data Tables: May store pre-defined data like language characters or
mathematical constants.
Advantages of ROM:
• Non-volatile storage: Data stored in ROM is permanent and persists even when
the power is off. This is crucial for storing essential system instructions and data
that the device needs to function from the start, like the BIOS.
• Reliability: Due to its non-volatile storage and lack of moving parts, ROM offers
reliable data storage. The data is less susceptible to degradation or corruption
compared to storage devices that rely on magnetic or flash memory.
• Security: The read-only characteristic of ROM provides inherent data security.
Since accidental or unauthorized modifications are restricted, it safeguards critical
system functions and program integrity.
• Durability: ROM is generally considered more durable than other storage options
like HDDs because it has no moving parts. This makes it ideal for use in devices
that may experience wear and tear.
• Faster Read Speeds: ROM offers faster read speeds compared to some storage
devices like HDDs. Data access is electronic, eliminating the mechanical delays
associated with spinning disks in HDDs.
• Lower Cost : Manufacturing ROM is generally less expensive compared to RAM.
This is because ROM relies on simpler circuitry and doesn't require the complex
data refresh mechanisms needed in RAM.
• Versatility: Different ROM types cater to various needs.
Disadvantages of ROM:
Functionality:
• Non-volatile Storage: Like ROM, EEPROMs retain data even when the
power is off. This ensures critical information and settings are preserved
between restarts.
• Read-Write Capability: Unlike traditional ROM, EEPROMs allow you to
erase and rewrite specific data bytes electronically. This provides more
flexibility than fixed ROM variants.
• In-Circuit Programming: EEPROMs can be programmed and erased
while they are still installed in a device (in-circuit). This eliminates the
need for removal and reprogramming, simplifying the update process.
How it Works:
EEPROMs utilize floating-gate transistors to store data. These transistors have
a floating gate that traps or releases electrons, representing a 1 or 0 binary
value. By applying specific electrical charges, individual bytes of data can be
erased and reprogrammed.
Data Storage:
EEPROMs rely on a special type of transistor called a floating-gate transistor.
This transistor has three terminals: gate, source, and drain.
Advantages of EEPROM:
• Rewritable: EEPROM offers the ability to rewrite data electronically, providing more
flexibility than fixed ROM. This is useful for storing settings that may need occasional
adjustments.
• Non-volatile: Data stored in EEPROM is permanent and survives power outages,
ensuring critical information and settings are preserved.
• In-Circuit Programming: The ability to program and erase EEPROMs while they are
still installed simplifies the update process, eliminating the need for removal and
reprogramming.
• Durability: EEPROMs offer reliable data storage due to their non-volatile nature and
lack of moving parts.
• Faster Write Speeds: Writing data to EEPROMs is generally faster than programmable
ROM types like PROM or EPROM that require UV light for erasure.
Disadvantages of EEPROM:
• Limited Write Cycles: While rewritable, EEPROMs have a limited number
of erase/write cycles before they wear out. This lifespan needs to be
considered when choosing EEPROM for frequent data changes.
• Slower Write Speeds: Although faster than some ROM types, writing data to
EEPROM is still slower compared to RAM due to the electrical erasing
process involved.
• Higher Cost: EEPROMs are generally more expensive to manufacture
compared to traditional ROM due to their more complex circuitry.
• Lower Capacity: EEPROMs typically have a lower data storage capacity
compared to hard drives or solid-state drives (SSDs).
Applications of EEPROM:
• Storing BIOS Settings: EEPROMs are commonly used to store BIOS (Basic
Input/Output System) settings in computers. These settings control hardware
configuration and can be occasionally updated.
• Configuration Data: EEPROMs are useful for storing configuration data in
various devices like printers, routers, and embedded systems. This data
allows for customization and can be adjusted without replacing the device.
• Programmable Logic Controllers (PLCs): EEPROMs are used in PLCs to
store control programs for industrial automation systems. These programs
can be updated as needed.
• Smart Cards: EEPROMs are used in smart cards to store data like financial
information or identification details securely.
Flash Memory
Flash memory, ubiquitous in our daily lives, plays a crucial role in storing and
transporting data. It bridges the gap between the speed and volatility of RAM and the
permanence and capacity of hard drives. Let's delve into the fascinating world of flash
memory:
How it Works:
Flash memory utilizes a technology called NAND flash, which relies on floating-gate
transistors similar to EEPROMs. Here's a breakdown of the storage mechanism:
• Data Representation: Each floating-gate transistor stores multiple bits (typically 1 to
4) of data. The number of electrons trapped in the floating gate determines the voltage
level, representing different binary values (0s and 1s).
• Programming: To write data, a voltage is applied to the control gate, forcing electrons
through the oxide layer to accumulate around the floating gate. The number of
electrons trapped determines the programmed voltage level.
• Erasing: Unlike EEPROMs that erase individual bytes, flash memory erases entire
blocks of transistors at once. A high voltage is applied across the cell, causing
electrons to tunnel away from the floating gate, effectively erasing the data in that
block.
Types of Flash Memory:
• Single-Level Cell (SLC): Stores only one bit per cell, offering the highest
performance, endurance (write cycles), and reliability. However, it's also the
most expensive and has the lowest capacity.
• Multi-Level Cell (MLC): Stores two or three bits per cell, providing a
balance between cost and capacity but with lower endurance and
performance compared to SLC.
• Triple-Level Cell (TLC): Stores three bits per cell, offering the highest
capacity and affordability but with the lowest endurance and performance
among the three types.
Advantages of Flash Memory:
• Non-volatile storage: Data persists even when the power is off, similar to
hard drives.
• Faster access times: Compared to hard drives with spinning platters, flash
memory offers much faster read and write speeds.
• Solid-state design: No moving parts, leading to higher durability, shock
resistance, and lower power consumption compared to HDDs.
• Scalability: Flash memory cells can be miniaturized, allowing for high-
density storage in compact devices like smartphones and USB drives.
• Rewritable: Flash memory can be erased and reprogrammed multiple times.
Benefits:
Faster Data Access
Reduced Memory Traffic
Improved Instruction Processing
Device Drivers
• Device Driver in computing refers to a special kind of software program or a
specific type of software application that controls a specific hardware device
that enables different hardware devices to communicate with the computer’s
Operating System.
• A device driver communicates with the computer hardware by computer
subsystem or computer bus connected to the hardware.
• Device Drivers are essential for a computer system to work properly because
without a device driver the particular hardware fails to work accordingly,
which means it fails in doing the function/action it was created to do.
How it works ?