0% found this document useful (0 votes)
61 views

ROM and RAM

This document discusses different types of computer memory. It begins by defining common units of measurement like bits, bytes, and larger units. It then describes the two main types of memory, RAM and ROM, and their distinguishing characteristics. The document explains how the CPU accesses and addresses memory locations. It provides details on different types of ROM like PROM, EPROM, EEPROM, and flash memory. Finally, it discusses RAM technologies like DRAM and SRAM and includes examples of analyzing memory chips based on their pinouts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

ROM and RAM

This document discusses different types of computer memory. It begins by defining common units of measurement like bits, bytes, and larger units. It then describes the two main types of memory, RAM and ROM, and their distinguishing characteristics. The document explains how the CPU accesses and addresses memory locations. It provides details on different types of ROM like PROM, EPROM, EEPROM, and flash memory. Finally, it discusses RAM technologies like DRAM and SRAM and includes examples of analyzing memory chips based on their pinouts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Memory

A bit (short for "binary digit") is the smallest unit of measurement used to quantify computer data. It
contains a single binary value of 0 or 1. A group of 8 bits is a byte. A nibble is half byte or 4 bits. A word
is 2 bytes or 16 bits. A kilobyte is 210 bytes, which is 1024 bytes. A Megabyte is 220 bytes. It is exactly
1,048,576 bytes. Gigabyte is 230 bytes (over 1 billion) and Terabyte is 240 bytes (over 1 trillion). Suppose
that a given computer has 16Megabytes of memory. That would be 16 x 2020 bytes or 24 x 2020 bytes
which is also 2024 bytes.

Two types of memory commonly used in computer system are RAM and ROM which stands for Random
Access Memory and Read-Only Memory. RAM is used by computer for temporary storage of program
that is running. That data is lost when computer is turn off. For this reason, RAM is sometimes called
volatile memory. ROM contains programs and information essential to operation of computers. The
information in ROM is permanent, cannot be changed by the user, and is not lost when the power is
turned off. Therefore, it is called non-volatile memory.

The function of Central Processing Unit (CPU) is to process information stored in memory. The data can
be accessed by the processor through Data Bus. For the device or memory locations, be recognized by
the CPU, it must be assigned an address. Those assigned address are unique in every locations of
memory. These addresses are managed by the Address Bus.

The Address Bus width size determines the size of relocatable memory address. For CPU with 16bit
address bus, can provide 216 or 64K of addressable memory. To summarize, the total number of memory
addressable by a given CPU is always equal to 2x where x is the number of address bits, regardless of the
size of the data bus. The minimum size of addressable location is byte and so they are byte addressable.
In case of program ROM in AVR MCUs each addressable location is 2bytes in size or word addressable.

The number of bits in semiconductor memory chip can store is called chip capacity. It can be in units of
Kbits (kilobits), Mbits (megabits) and so on. This must be distinguished from the storage capacity of
computer system. While the capacity of memory chip is always given in bits, the memory capacity of
computer system is given in bytes. For example, an article in technical journal may state that the 128M
chip has become popular. In that case, it is understood, although it is not mentioned, that 128M means
128 Megabits since the article is referring to an IC memory chip. However, if an advertisement states
that a computer comes with 128M memory, it is understood that 128M means 128 Megabytes since it is
referring to a computer system.

Programmable ROM (PROM) refers to a kind of ROM that the user can burn information into. In other
words PROM is a user programmable memory. These types of ROM memory are one time
programmable OTP. If the information burned into it is wrong, it will be discarded since the data is store
permanently. ARM based MCU uses this feature of ROM to allow software developer in saving some
information before releasing the product like control, inventory, and date codes. AVR MCUs doesn’t
have this kind of ROM

Erasable PROM (EPROM) are invented to allow making changes of the contents of PROM after it is
burned. Although it can be program a thousand times, erasing process is hassle. It takes 20minutes of
exposing to UV light to erase its content. They are also commonly known as UVPROM. These ROMs are
replaced by EEPROM which are electrically erasable.

EEPROM has several advantages over EPROM such as the fact its method of erasure is through software
as opposed to 20minute erasure time required in UVEPROM. In addition EEPROM can select which byte
address to be erased, in contrast with UV EPROM, in which the entire contents of ROM are erased. AVR
MCUs has this type of ROM, from several bytes up to several Kilobytes.

Flash memory ROM has become popular user-programmable memory chip, and for good reasons. First
the erasure of the entire contents takes less than a second, or one might say in flash, hence its name,
Flash memory. These are also electrically erasable type of ROM, so to avoid confusion, it is commonly
called Flash memory. The main difference is that, in EEPROM selectable bytes can be erased, in Flash
memory, you can only erase the whole block of memory.

In embedded systems, program ROM is commonly known as Flash ROM because they use flash memory.
If MCU provides several boot options, means they provide different flash memory blocks. One block for
one bootloader, to allow software developer erase only particular portion ROM or should I say erase
only one boot option.

DRAM are most commonly use in general purpose CPU because they are inexpensive type of RAM. It
uses capacitor to store information in its memory cell. For this reason, capacitor cells need to refresh
periodically because the capacitor cell loses its charge. Furthermore, while DRAM is being refresh, the
data cannot be accessed. This is in contrast of SRAM which retain its data in its cell as long as the power
is on, because SRAM is made up of flipflops. Because SRAM are faster than DRAM, they are used as RAM
memory in embedded system chip. Most AVR has several Kilobytes of SRAM. This is one feature that
makes the MCU a higher cost. Arduino Uno MCU has 2K of SRAM and is enough in small size of software
applications.

Some RAM has special circuitry to maintain its power switching from main power to battery cell. This
type of RAM are called NVRAM. They are designed power efficient to prolong energy source when
powered in battery cells.

By observing the pin names, data bus size and address width can be determine. The 24 pin chip in the
figure, has A0-A10. These are address lines. The IO0 -IO7 are data lines, so this SRAM is byte
addressable, and has 211 (2048 = 2K) addressable memory. Therefore this SRAM has memory size of
2Kilobytes or 16Kilobits (2K x 8bits).
This observation is also applicable in ROM memory chip. The ROM chip below has A0 – A13 address lines
and D0-D7 datalines. This chip is byte addressable with 214 (16384 = 16K) addressable memory. So it has
a capacity of 16Kilobytes of memory or (16K x 8bits) 128Kilobits

DRAM split the higher half and the lower half of the address location. If value 0x55AA need to store in
DRAM, send the first half by enabling the RAS pin, assume 0xAA, then send another half 0x55 by
enabling the CAS pin. This technique saves some address lines of the chip. The DRAM chip below has
address lines of A0-A7(8bits) and data lines of DQ1 – DQ4 (4bits) and has RAS and CAS pins for address
selections. Therefore this DRAM has 28 x 2(RAS/CAS) x 4(datalines) = 2Kilobits (2048 bits) or 256 bytes of
memory.

You might also like