0% found this document useful (0 votes)
36 views27 pages

Memory Expansion & Memory Map

The document provides an overview of microprocessor-based systems, focusing on memory types and their classifications, including program memory (ROM) and data memory (RAM). It explains various memory characteristics, operations, and the distinctions between volatile and non-volatile memory, as well as the specifics of RAM and ROM types such as SRAM, DRAM, PROM, EPROM, and EEPROM. Additionally, it covers memory expansion procedures, memory mapping, and exercises for practical understanding of memory organization and addressing.
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)
36 views27 pages

Memory Expansion & Memory Map

The document provides an overview of microprocessor-based systems, focusing on memory types and their classifications, including program memory (ROM) and data memory (RAM). It explains various memory characteristics, operations, and the distinctions between volatile and non-volatile memory, as well as the specifics of RAM and ROM types such as SRAM, DRAM, PROM, EPROM, and EEPROM. Additionally, it covers memory expansion procedures, memory mapping, and exercises for practical understanding of memory organization and addressing.
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/ 27

TEE 4311: Microprocessor

& Interfacing
A Microprocessor Based System
Memories
 Storage of data and instructions is accomplished using memories,
 There are two separate memory units in an microprocessor based system:
 Program memory used to store the program (A set of instruction)
 ROM,
 Typical ROM devices include: PROM, EPROM, EEPROM, FLASH

 Data memory used to store the data


 RAM
 Typical RAM devices include: SRAM and DRAM
MEMORIES
 Memory refers to any device that stores information for later use. A memory is made up of a
large number of cells (flip-flops), with each cell capable of storing one bit.
 Memory Terminologies
 Memory location: this are locations in memory where we can store/ write or copy / read data
 Memory cell : is the smallest memory location capable of storing one bit
 Memory word: this is a group of bits representing data of some type stored at a given memory location
e.g.
 Nibble is a 4 bit word
 Byte is an 8- bit word
 Kilo (K) refers to 1024 eg. 1KB = 1024 Bytes
 Memory Address: Is a unique number or notation usually in hexadecimal number system used to denote
any particular memory location
 Memory Capacity: It is the total number of memory locations or bits or words in a given memory device /
chip/ module/ system
 Memory Read Operation: involves storing or witting data in a given memory location
 Memory Write Operation: involves coping or Reading data in a given memory location
 Volatile memory : Is one that losses its content whenever the powering agents Is withdrawn/ removed/
disconnected / switched off.
 Non Volatile memory: Is one that retains its content even when the powering agents Is withdrawn/
removed/ disconnected / switched off.
Memory Categories
 The memory of computer may be divided into two categories:
1. Primary or main memory
2. Secondary or mass storage memory
 Primary memories are semiconductor memories. The two basic types of
semiconductor; memories are ROM and RAM.
 ROM is a read only memory.
 RAM is a random access memory.
 Semiconductor memory is a static device.
 It is faster,
 smaller in size
 Lighter in weight
 consumes less power compared to other types of memory devices.
 Secondary memories, include magnetic and optical disks
 they are cheaper than semiconductor memories
 Large in capacity
 Though slow to access than the semiconductor memories
CLASSIFICATION OF MEMORIES
 Memories, in general, are classified on the basis of several attributes., for example
organizational structure for the classification of semiconductor memories
Random Access Memories (RAMs)
 Memory cells used to read and write are called Random-Access Memory or RAM.
 Memory cells can be accessed for information transfer to or from any desired
random location and hence the name random access memory.
 RAM is not the correct name because ROM has also random access property. The
correct name of RAM should be read/write memory.
 RAM is a volatile memory. It stores information as long as power is supplied to it.
 Its contents are lost when power supply is switched off or interrupted.
 There are two types of RAM: static RAM (SRAM) and dynamic RAM (DRAM).
Static and Dynamic RAMs:
 A static RAM chip is characterized by the fact that once a bit of information is
written into a cell, the cell retains this information until it is overwritten or electrical
power is switched off.
 The cell itself is a flip-flop and may consist of four to six transistors. Hence, its packing
density is low. It consumes more power and is faster than DRAM. It is manufactured
in smaller sizes.
A dynamic RAM
 A dynamic RAM stores information in the form of a charge on a capacitor, which
leaks away in very short time. One bit of information is stored as the charge on a
capacitor.
 Typically, a DRAM can store about four times as much information as a static RAM
in the same area due to the smaller cell structure. This also leads to lower cost per
bit for DRAMs.
 DRAM consumes less power.
 It is cheaper than SRAM.
 It is produced in large sizes.
 Since the data are stored as charges on capacitors, the dynamic RAM requires
refresh once every few milliseconds in order to retain the stored information.
 The refreshing needs extra circuitry and makes the interfacing of dynamic RAMs
to microprocessor more complex interfacing of static RAMs.
 Systems which require large memory capacity, use dynamic RAMs to lower the
memory cost. Most personal computers use dynamic RAMs as primary memories.
 Static RAMs are used where speed of operation is of prime concern, and either
the memory size is not too large, or cost is not the prime criteria during system
design.
Read Only Memories (ROMs) and Their Variations
 A read only memory is a semiconductor memory device used to store permanent
information and it performs only read operation.
 It is actually a programmed chip. The contents of the memory are fixed during
fabrication of the integrated circuit and cannot be altered after manufacture.
 Both bipolar and MOS technology are used for manufacturing ROMs.
 The primary difference between bipolar and MOS ROMs is the access time.
 Bipolar access times are as low as 20–50 ns; MOS access times are about five times
higher.
 Bipolar ROMs are faster and have a higher driving capacity.
 While MOS devices are smaller for a given number of bits and consume less power.
 variation of ROM chip is programmable read only memory (PROM). The user can
write a program, data or any other kind of information permanently into a PROM.
PROMs are only once programmable, i.e., the user can write his program/data
into a PROM only once.
 Both the ROM and the PROM consist of some kind of fuse in each cell. Blowing off
or retaining the fuse decides whether the cell contains a 1 or a 0.
EFROM
 A PROM that can be erased by ultraviolet light and then programmed, is known as an
EPROM.
 The ultraviolet light of wavelength 2537Å is used for erasing the contents of an EPROM. In
order to erase the EPROM, it has to be taken out of its normal circuit and placed in front
of a special ultraviolet eraser for a few minutes.
 The typical erasure time varies from 15 min to 60 min. The programs which are at
development stage, are also stored in EPROM because they are to be modified many
times.
 EPROMs are more economical than PROMs because they can be reused. It uses one
transistor memory cell and hence it has high density.
EEPROM
 EEPROMs are electrically erasable PROMs. They are also called EAPROM (electrically
alterable ROM).
 The EEPROM can be erased and programmed, while under normal operation.
 This makes the EEPROM ideal for applications where some parametric data needs to
change over a period of time, perhaps as the system that is being controlled by the
Microprocessor based controller ages.
 Its disadvantage is that different voltages are required for erasing, writing and reading
the stored information. It requires a pulse of 21 V for writing and erasing, and 5 V for
read operation.
 Typical erasure times vary between 1–10 s.
CHARACTERISTICS OF MEMORIES
When selecting a memory chip for use in a microprocessor-based system, a designer
normally examines the following characteristics :
1. Capacity and organization
2. Timing characteristics, also known as AC characteristics
3. Power consumption and bus loading, also known as DC characteristics
4. Physical dimensions and packaging
5. Cost
6. Reliability, and
7. Availability.
Memory Hierarchy
MEMORY ORGANIZATION
 Memory can be either:
 Bit organized or
 Word organized
 Bit organized memory implies that each memory location contains a single bit
 1K x 1
1K x 1

 Word organized memory implies that each memory location contains a memory
word
 1K x 4 1K x 4 1K x 8 1K x 16
 1K x 8
 1K x 16
Memory Expansion
 Memory expansion is carried out whenever we need a larger memory
capacity for our application, but the available memory chip/ modules are of
low capacity
 Hence we need to connect a number of the available memory chip to realize
the expected memory capacity for our application
 For example the available memory chip may be 1K x 8 however our
application requires a memory capacity of 4K x 8

AA AR

1K x 8

4K x 8
D

D
Procedure for memory expansion
 The procedure to realize an larger memory capacity from the available
low memory chip capacity is as follows
 Divide the required memory capacity by the available memory chip to determine
the number of available memory chip to be connected together
 # memory chip = required memory capacity/ available memory chip
 Determine the number of address line for both the required and available memory
modules
 Address line = log (memory capacity C )/log 2
= A log 2/ log 2
Where A is the number of address lines determined from the memory capacity C as
follows C = 2A
 Get the difference between the two addresses to determine the appropriate
Decoder for expansion
 ARequired – Aavailable = n where n is the number of the inputs to the decoder
 Interconnect the memory chip together with the decoder to realize the required
memory
Procedure for Memory Expansion; Example
 Implement a memory capacity of 4Kx 8 using the available 1024x8 ROM chips
 Solution:
 No. of chips = [4K x 8]/ [1K x 8]
= 4 chips 1
 No of address line for the required memory
= 12log 2/log2
= 12 lines
 No of address line for the available memory
= 10log 2/log2

= 10 lines
 The required decoder inputs
= 12- 10 lines
= 2 input lines
 Therefore we require a 2 – to - 4 decoder
Solution
Exercise
Implement the following memory
expansions
2 K x 8 using the available 256 x 8 memory chip
1K x 8 using the available ¼ K x 8 memory chip
2 K x 4 using the available ½ K x 4 memory chip
Memory Map
 Memory map is a pictorial representation of memory space segmentation for the
various modules /chips and-or I/O devices in a given system.
 For example a given systems may have the following memory chips
 4KB ROMChip
 6KB PROM Chip
 50KB RAM chip
 Each of this chip will have the starting address as well as ending address
 Hence using memory map we can represent the corresponding addresses for
each chip
ROM chip

PROM Chip

RAM Chip
 Similarly we can determine the range and the number of memory pages for each
memory module
Procedure for memory Map
 For Each chip /Module determine the starting and ending address from
the provided memory capacity.
 By applying the number system conversion we can convert the decimal number
into its Hexadecimal equivalent
 Given the starting address we can determine the ending address by adding the
given capacity less by-1 to the starting address (both in hexadecimal)
 On the other hand given the ending address we subtract the given capacity less
by-1from the ending address [both in hexadecimal]
 For each chip determine the actual Range of address i.e. is the starting and
ending address / pages
 To determine the number of pages in each chip we divide the chip
memory capacity by 256; since 1 memory page is equivalent to 256
memory locations (i.e. FFH)
Example:
 The start addresses of memory devices in a memory system are given as:
 4KB ROM Chip 0000H
 6KB PROM Chip 1A00H
 50KB RAM chip 3500H
 For each of the chip determine
 The range
 The number of pages
 Draw the device memory map
Solution:
 ROM Chip 4K = 4096B
 Memory location range 010 to 409510
 409510 = 0FFFH
 Starting address is 0000H
 Ending Address is 0FFFH
 Range 0000H – 0FFFH
 Number of pages = 4096/256 = 16 pages k
 PROM Chip 6K = 6144B
 Memory location range 0 to 614310
 614310 = 17FFH
 Starting address is 1A00H
 Ending Address is =1A00H +17FFH = 31FFH
 Range 1A00H – 31FFH
 Number of pages =6144/256= 24 pages
Solution:
 RAM Chip 50K = 51200B
 Memory location range 0 to 5119910
 5119910 = C7FFH
 Starting address is 3500H
 Ending Address is =3500H +C7FFH = FCFFH

 Range 3500H – FCFFH


 Number of pages = 51200/256= 200 pages
Memory Map Solution
Exercise 1
 The start addresses of memory devices in a memory system are given as:
 2KB DRAM Chip 00FEH
 3KB EPROM Chip 1E00H
 20KB ROM chip 4F00H
 For each of the chip determine
 The range
 The number of pages
 Draw the device memory map
Exercise 2
 The ending addresses of memory devices in a memory system are given as:
 3KB SRAM Chip 10FEH
 5KB PROM Chip 7E00H
 30KB EPROM chip FF00H
 For each of the chip determine
 The range
 The number of pages
 Draw the device memory map

You might also like