You are on page 1of 26

Microprocessors

Architectures
LEC. 2: 8085 MICROPROCESSOR INTERFACING AND
ADDRESSING MODES
OMAR ZYAD
8085 Microprocessor Interfacing
As we learn in last lecture about the Address Bus
◦ 16 lines.
◦ It is used to carry the address of memory location and
address of input ports
◦ It is unidirectional.
◦ A0 – A15

How much memory location can be used?


◦ To answer the question by using the formula :
2^N
Where N is the number of bits used for address lines
8085 Microprocessor Interfacing
Ex: If a processor has 1MB memory then how many address lines are required
to access this memory?
◦ Sol: 1MB = 1024KB = 1024 * 1024B = 2^10 * 2^10 = 2^20
◦ The address line is 20.

Ex: If a processor has 4GB memory then how many address lines are required to
access this memory?
◦ Sol: 4GB =4 * 1024MB = 4 * 1024 * 1024 * 1024B = 2^2 * 2^10 *2^10 * 2^10
= 2^32
◦ The address line is 32.
8085 Microprocessor Interfacing
Memory Map
I/O map
Memory Mapped vs. I/O Mapped
MEMORY MAPPED IO IO MAPPED IO

IO is treated as memory IO is treated I/O


16-bit addressing 8-bit addressing
More Decoder Hardware Less Decoder Hardware
Can address 2^16 =64k locations Can address 2^8 = 256 locations
Memory Instructions are used Special Instructions are used like IN,OUT
Arithmetic and logic operations Arithmetic and logic operations cannot
can be performed on data be performed on data
Data transfer b/w register and IO. Data transfer b/w accumulator and IO
Memory Map
Address Decoding
◦ Assign an address for each location in the memory chip.
◦ The address can be decoded in two ways:
1. Absolute or Fully decoding
2. Linear Select or Partial decoding

Microprocessor Address Decoding Memory


Memory Map
Absolute or Fully decoding
◦ Advantages
1. Each memory location has only one address, there is no duplication in
the address
2. Memory can be placed contiguously in the address space of the
microprocessor
3. Future expansion can be made easily without disturbing the existing
circuitry

◦ Disadvantages
1. Extra decoders are necessary
2. Some delay will be produced by these extra decoders.
Memory Map
Linear Select or Partial decoding
◦ Advantages
1. its simplified decoding circuit.
2. This reduces the hardware design cost.

◦ Disadvantages
1. Multiple addresses are provided for the same location
2. Complete memory space of the microprocessor is not efficiently
used
3. Adding or interfacing ICs with already existing circuitry is difficult.
Memory Map
MEMORY DEVICES
◦ It is used to store data and instruction. Computer memory is the storage space in
computer where data is to be processed and instructions required for processing
are stored.

Type of Memory Devices


◦ Internal Memory – (Also called primary or main memory)- This is the one which
sits just outside the CPU. These memories can be static or dynamic. It can also
stay in the same chip as of CPU (called cache memory).
◦ External Memory (Also called Auxiliary or Secondary memory)− These are
generally treated as Input/output devices. They are much cheaper mass storage
and slower devices connected through some input/output interface circuits.
They are generally magnetic or optical memories such as Hard Disk and CDROM
devices.
Memory Map
Also the memory can be classified as
◦ Volatile Memory - The contents are erased when the power is switched off.
Semiconductor Random Access Memories fall into this category.
◦ Non-volatile Memory - The contents are intact even of the power is
switched off. Magnetic Memories (Hard Disks), Optical Disks (CDROMs), Read
Only Memories (ROM) fall under this category.
Memory Map
Structure and organization of internal memory:
◦ The memory is divided into large number of small parts.
◦ Each part is called a cell.
◦ Each location or cell has a unique address which varies from zero to memory
size minus one.
◦ For example if computer has 64k words, then this memory unit has 64 *
1024 = 65536 memory location. The address of these locations varies from 0
to 65535.
m = 2^k
k = Log2(m)
where : m number of word , k number of address lines
Memory Map
Example: Memory with 4K with 8 bit each word
◦ 4*1024*8 = 32,768 bits
◦ k= log2(4096) = 12 address input signals
◦ 8 input/output data signals
Memory Map
Inside a Memory: Support Circuitry
◦ The following (simplified) diagram shows how to maps the internal physical
memory array to the external configuration 4x4 to 16x1.
Memory Map
RAM
◦ Static RAM SRAM
◦ Dynamic RAM DRAM
Memory Map
Static RAM SRAM
◦ The word static indicates that the memory retains its contents as long as
power remains applied. However, data is lost when the power gets down
due to volatile nature.
◦ SRAM chips use a matrix of 6-transistors and no capacitors. Transistors do
not require power to prevent leakage, so SRAM need not have to be
refreshed on a regular basis.
Memory Map
Dynamic RAM DRAM
◦ DRAM, unlike SRAM, must be continually refreshed in order for it to maintain
the data.
◦ This is done by placing the memory on a refresh circuit that rewrites the data
several hundred times per second.
◦ DRAM is used for most system memory because it is cheap and small.
◦ All DRAMs are made up of memory cells. These cells are composed of one
capacitor and one transistor.
Memory Map
ROM
◦ ROM stands for Read Only Memory.
◦ The memory from which we can only read but cannot write on it.
◦ This type of memory is non-volatile.
◦ A ROM, stores such instruction as are required to start computer when
electricity is first turned on, this operation is referred to as bootstrap.
◦ ROM chip are not only used in the computer but also in other electronic
items like washing machine and microwave oven.
Memory Map
Types of ROM
◦ MROM Masked ROM
Memory Map
Types of ROM
◦ MROM Masked ROM
◦ PROM Programmable Read Only Memory
 PROM is read-only memory that can be modified only once by a user.
 It can be programmed only once and is not erasable therefore it is also called “OTP
ROM: One-time programmable ROM”
Memory Map
Types of ROM
◦ MROM Masked ROM
◦ PROM Programmable Read Only Memory
◦ EPROM Erasable and Programmable Read only memory
The EPROM can be erased by exposing it to ultra-violet light for a
duration of up to 40 minutes.
During programming an electrical charge is trapped in an
insulated gate region.
The charge is retained for more than ten years because the
charge has no leakage path.
Memory Map
Types of ROM
◦ MROM Masked ROM
◦ PROM Programmable Read Only Memory
◦ EPROM Erasable and Programmable Read only memory
◦ EEPROM Electrically Erasable and Programmable Read Only Memory.
The EEPROM (or E2PROM) is programmed and erased electrically. It can be
erased and reprogrammed about ten thousand times.
Both erasing and programming take about 4 to 10 ms millisecond.
EEPROMs can be erased one byte at a time, rather than erasing the entire
chip. Hence, the process of re-programming is flexible but slow.
The flash memory is a type of EEPROM.
Memory Map
Types of ROM
◦ MROM Masked ROM
◦ PROM Programmable Read Only Memory
◦ EPROM Erasable and Programmable Read only memory
◦ EEPROM Electrically Erasable and Programmable Read Only Memory.
◦ Direct Access Memory
Direct access refers to conditions in which a system can go directly to the
information that the user wants.
Magnetic disks, optical disks are examples of direct access memory.
Memory Map
Types of ROM
◦ MROM Masked ROM
◦ PROM Programmable Read Only Memory
◦ EPROM Erasable and Programmable Read only memory
◦ EEPROM Electrically Erasable and Programmable Read Only Memory.
◦ Direct Access Memory
◦ Serial Access Memory
Sequential access means the system must search the storage device from
the beginning of the memory address until it finds the required piece of
data.
Magnetic tape is an example of serial access memory.
Memory Map
74X138 Decoder
Memory Map
RAM and ROM
Memory Map
Example 1: Design a circuit to interface 4KB RAM to the 8085
microprocessor at address from A000H to AFFFH.

Example 2: Design a circuit to interface 64 KB memory to the 8085


microprocessor using 16KB memory chip.

You might also like