0% found this document useful (0 votes)
4 views17 pages

Main Notes - Memory Unit & Mapping

The document provides an overview of memory units in microprocessors, detailing components such as flip-flops, latches, registers, and RAM/ROM chips. It explains how memory is accessed and organized, including addressing and control signals, and illustrates memory mapping with examples. Additionally, it includes calculations for memory requirements and chip usage for specific memory sizes.

Uploaded by

emmaogwayo3
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)
4 views17 pages

Main Notes - Memory Unit & Mapping

The document provides an overview of memory units in microprocessors, detailing components such as flip-flops, latches, registers, and RAM/ROM chips. It explains how memory is accessed and organized, including addressing and control signals, and illustrates memory mapping with examples. Additionally, it includes calculations for memory requirements and chip usage for specific memory sizes.

Uploaded by

emmaogwayo3
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

Foundations: Memory Unit Foundations: Microprocessors -DRuiru

© 2025 SU | 1
Objectives

• What is a memory unit?

• Flip-flop or latch?

• Registers

• Rom and Ram chips

• Memory map

© 2025 SU Foundations: Microprocessors -DRuiru | 2


Memory Unit

• A memory unit is a circuit that can store bits-high or low.


– Generally voltage levels or capacitive charge.

• Memory is a vital component of a microcomputer. It temporarily or


permanently stores binary instructions and data that a
microprocessor uses during program execution.

• To interact with memory, the microprocessor must:


– Select the memory chip: Identifying which chip to access.
– Identify the register: Each chip contains multiple registers
(memory locations), which must be addressed specifically.
– Perform read or write operation:
o Read: Fetch the data from the selected register.
o Write: Store data into the selected register.

© 2025 SU Foundations: Microprocessors -DRuiru | 3


Flip-Flop or Latch as storage
element
• A Flip-Flop or Latch is a fundamental circuit used to store a single
bit of data (either 0 or 1). These components make up registers
and memory units in microprocessor systems.

• In both cases: Data is written through input data DIN. The chip is
enable through pin EN. The data is read through pin DOUT.
– DIN (Data In): Input through which data is written to the storage element.
– EN (Enable): A control signal that activates the chip for read/write
operations.
– DOUT (Data Out): Output through which data is read.

• These storage elements use either voltage levels or capacitive


charges to represent bits.

© 2025 SU Foundations: Microprocessors -DRuiru | 4


Side Note

• Difference between latch and flip flop?

• Simple analogy: A latch is like a gate that opens while a button is pressed (data flows through), and closes
when you release the button (data is locked).
A flip-flop is like a camera that takes a snapshot only at the moment the shutter button is clicked (on a clock
edge).

© 2025 SU Foundations: Microprocessors -DRuiru | 5


Latch as a four bit register

• Figure above Illustrates the arrangement of latches or flip flop in a 4 bit


register.
• Each register can store a bit and can be activated by the WR and RD so that
they can be written or read from.
• The EN signal is part of the address bit the is used to enable a chip so that it
can be written to or read from.

© 2025 SU Foundations: Microprocessors -DRuiru | 6


4X8 bit register

© 2025 SU Foundations: Microprocessors -DRuiru | 7


Registers as Memory Building
Blocks
• 4-bit Register: Built by arranging 4 latches or flip-flops in parallel.
Each stores 1 bit, forming a 4-bit word.

• 4 x 8-bit Register: A structure with 4 registers, each capable of


storing 8 bits. Total capacity: 32 bits.

• Control Signals:
– WR (Write): Signal used to trigger writing data into the register.
– RD (Read): Signal used to trigger reading data from the register.
– EN (Enable): Helps in selecting specific registers by activating specific
address lines.

© 2025 SU Foundations: Microprocessors -DRuiru | 8


RAM and ROM Chips

• Figure above shows a R/W memory model and ROM


model

© 2025 SU Foundations: Microprocessors -DRuiru | 9


R/W and ROM

© 2025 SU Foundations: Microprocessors -DRuiru | 10


Memory map and addresses

• Intel 8085 Addressing:


– 16 address lines: Can address up to 2^{16} =65536 memory locations.
– Each address corresponds to an 8-bit memory register.
• Memory Mapping:
– A memory map is a visual representation showing where each memory device or
register is located within the addressable space of the microprocessor.
– Example: A 256-register memory needs only 8 address lines (since 2^8 =256).
– Remaining address lines are used with chip select logic (e.g., NAND gates) to
enable or disable the chip.

• Figure above shows a Memory map for 256 register memory

© 2025 SU Foundations: Microprocessors -DRuiru | 11


Address map for 256 register
memory

© 2025 SU Foundations: Microprocessors -DRuiru | 12


Memory map and addresses
illustration
• Figure in slide 11 shows a memory chip with 256 registers and eight
I/O lines.

• Memory size of the chip is expressed as 256 x 8.

• It has 8 address lines (A7 − A0), one chip select signal and two
control signals RD and WR.

• Only 8 address lines A7 − A0 are required to identify 256 memory


registers.

• The remaining eight lines A15 − A8 are connected to the chip select
line through inverters and the NAND gate.

© 2025 SU Foundations: Microprocessors -DRuiru | 13


Question

Q1: Describe the address map with a diagram showing how 1K (1024x8) memory is mapped.
Show all the control signals.

Answer:

• Memory size: 1024 x 8 means 1024 memory locations, each 8 bits wide.

• Address lines needed: 2^{10} =1024, so we need 10 address lines (A0 to A9).

• Control signals required:


– RD (Read): To read data from memory.
– WR (Write): To write data to memory.
– CS (Chip Select): To enable the chip when its address range is active.
• Address Map Diagram (Textual Description):
– Address range: 0000h to 03FFh (in hexadecimal).
– A0–A9: Connect directly to the memory chip’s address inputs.
– A10–A15: Used with logic gates (e.g., decoders or NAND gates) to generate the CS signal.
– CS becomes active when higher address bits match the predefined range.
– WR and RD connect directly to the memory chip to control data flow.

© 2025 SU Foundations: Microprocessors -DRuiru | 14


Memory word size

• Memory devices are available in various word sizes (1,4


and 8) and the size of the memory chip is generally
specified in terms of the total number of bits it can
store.

• For instance a memory chip of size 1024 x 4 has 1024


registers and each register has 4 bits, thus it can store
a total of 4096 = 1024x4 bits.

© 2025 SU Foundations: Microprocessors -DRuiru | 15


Question

Q2: Calculate the number of memory chips needed to design 8K byte memory if the available
chip size is 1024x1.

Answer:

• Required memory: 8 KB = 8×1024=8192 bytes

• Available chip: 1024 x 1 → Stores 1024 bits = 128 bytes per chip.

Now calculate the number of chips:

• Total bits needed = 8 KB×8=8192×8=65536 bits.

• Bits per chip = 1024 bits.

• Number of chips = 65536/1024=64 chips.

• So, 64 chips of 1024x1 are needed to implement an 8K byte memory.

© 2025 SU Foundations: Microprocessors -DRuiru | 16


Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya
Tel: (+254) (0)703 034000/200/300 Fax : +254 (0)20 607498
Email: info@[Link] Website: [Link]
|

You might also like