W4
W4
The memory stores binary instructions and data for the microprocessor.
The number of bits stored in a register is called a memory word. The
memory word length for 8-bit microprocessor should be 8 bits. (3b)
The 8085 MPU with its sixteen address lines is capable of identifying
or addressing 65,536 (64K) such memory registers or location. (5)
o For example, to read from or write
into a memory location or register 5,
the MPU places 𝟏𝟎𝟏𝟐 address on the
address bus and this register is
identified by decoding its address by
the decoder.
The control signal (R/𝑊 ) enables
the I/O lines, and the data byte is
either read from or stored in the
memory location. The chip select
Figure: A Memory Chip with 08
(𝐶𝑆) line also known as (𝐶𝐸) is
Registers.
needed to select one particular
memory chip from several memory
chips in a system.
Memory Map:
“The assignment of addresses to memory registers in various memory
chips in a system is called the memory map.” (6)
For example, memory map of 8085 μ-processor based system ranges
from 0000H to 𝐹𝐹𝐹𝐹H (216 = 65,536), which is analogous to identical
houses built in a sequence and their postal addresses (numbers).
o Assuming 10,000 houses are numbered by 04-digit decimal
numbers. In order to avoid cumbersomeness, the numbering scheme
can be devised with the concept of a block (row) and each block will
have 100 houses to be numbered with the last 02 digits from 00 to 99.
o Similarly, the blocks are also identified by the first two decimal digits,
e.g. a house with the number 0247is house number 47 in block 02.
In the binary number system, 16 binary digits can have 65,536 (216 )
different combinations. In the hexadecimal number system, 16
binary bits are equivalent to 04 Hex digits that can be used to assign
addresses to 65,536 memory registers from 0000H to FFFFH ---- 256
pages with 256 lines each (256 x 256 = 65,536). (7)
o So, a line (register) is equivalent to a house, a page is equivalent to a
block, and eight flip-flops in a register are equivalent to eight rooms in
in a house.
For example, the memory address 020FH represents line 15
(register) on page 2, the address 07FFH represents line 255 (register)
on page 7, and the address 1064H represents line 100 (register) on
page 16 (64H = 10010 and 10H = 1610 ).
Example: Illustrate the memory map of the chip with 256 bytes
(registers) of memory and 8 I/O lines as shown in Fig (a), and explain
how the memory map can be changed by altering the hardware of the
chip select (𝐶𝑆) line as shown in Fig (b).
o The memory size of this chip is expressed as 256 × 8. It has 08
address lines, one Chip Select (𝑪𝑺) line (active low), & one (R/𝑊 ) line.
The 08 address lines (𝐴7 − 𝐴0 ) of the MPU are required to identify 256
(28 ) memory registers. The 08 other address lines (𝐴15 − 𝐴8 ) are
connected to the Chip select (𝐶𝑆) line through inverters and NAND
gate. When this Chip select line goes low, the memory chip is enabled,
so the (𝐴15 − 𝐴8 ) should be at logic 0.
o Once the memory chip is selected, the address lines (𝐴7 − 𝐴0 ) can
assume any combination from 00H to FFH , and identify any one of
the 256 memory locations through its decoder. The control signal
(R/𝑊 ) enables data flow.
Chip Select Logic
𝐴15 𝐴14 𝐴13 𝐴12 𝐴11 𝐴10 𝐴9 𝐴8 𝐴7 𝐴6 𝐴5 𝐴4 𝐴3 𝐴2 𝐴1 𝐴0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = 0000H
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 = 00FFH
(8)
(Memory Map)
o The memory map of the chip can be changed by modifying the
hardware; e.g. if the inverter on line 𝐴15 is removed as shown in Fig.
(b), the address required on lines (𝐴15 − 𝐴8 ) to enable the chip is:
𝐴15 𝐴14 𝐴13 𝐴12 𝐴11 𝐴10 𝐴9 𝐴8 (Memory Map)
1 0 0 0 0 0 0 0 = 80H 8000H to 80FFH
Important Points Regarding The Memory Map:
o Sixteen address lines (16 bits) of 8085 μ-processor can address
65,536 memory registers.
o In memory addressing, low-order addresses from 00H to 𝐹𝐹H are
viewed as line number and high-order addresses are viewed as page
numbers.
o For a given memory chip, the number of address lines required to
identify the registers is determined by number of registers in the
chip. The remaining address lines can be used for selecting the chip.
o The memory map of a given chip can be changed by changing the
hardware of the chip select (𝐶𝑆) or chip enable (𝐶𝐸) line.
Example: Memory Map of a 1K (𝟏𝟎𝟐𝟒 × 𝟖) Memory Chip
o The memory chip has 1024 registers, so 10 address lines (𝐴9 − 𝐴0 ) of
the MPU are needed to identify registers and the remaining 6 address
lines (𝐴15 − 𝐴10 ) are used for the chip select (𝐶𝑆).
o The memory chip is enabled, when the address lines (𝐴15 − 𝐴10 ) are
at logic 0. While the address lines (𝐴9 − 𝐴0 ) can assume any address
of the 1024 registers starting from all 0’s to all 1’s as:
Chip Select Logic
𝐴15 𝐴14 𝐴13 𝐴12 𝐴11 𝐴10 𝐴9 𝐴8 𝐴7 𝐴6 𝐴5 𝐴4 𝐴3 𝐴2 𝐴1 𝐴0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = 0000H
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 = 03FFH
(9)
(Memory Map)
o The memory map ranges from from 0000H to 03FFH . In terms of
page analogy, this can be represented as memory having 04 pages:
00 00 Page 0 with 256 lines. 01 00 Page 1 with 256 lines.
00 FF 01 FF
02 00 Page 2 with 256 lines. 03 00 Page 3 with 256 lines.
02 FF 03 FF
o The memory map of 1K memory chip
can be altered to any other location
by changing the hardware of the
(𝐶𝑆) line; e.g. If the inverter of the
line 𝐴15 is removed, the memory map
will range from 8000H to 83FFH .
The MPU can read or write into this memory. Two types of R/W memory
are available: Static and Dynamic,
o Static memory is made up of flip-flops that store a bit information as
voltage. The memory chip has low density but high speed.
o Dynamic memory is made up of a large number of MOSFET transistor
gates can be placed on a memory chip, which stores a bit as charge.
It has high density and is faster than static memory.
o The disadvantage is that the charge (information) leaks, that’s why
refreshing the memory is done which requires additional circuitry.
ROM:
ROM is nonvolatile memory that retains the stored information even if
the power is turned off. The information is permanently stored in the
ROM, like a song is recorded on a record. (12)