Memory Expansion & Memory Map
Memory Expansion & Memory Map
& 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
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