You are on page 1of 27

Embedded Systems Hardware

(EED308)

Dr. Rohit Singh 1


8085

Syllabus

Dr. Rohit Singh 2


Introduction to 8085

✓ The Intel 8085 ("eighty-eighty-five") is an 8-bit microprocessor produced by Intel

and introduced in March 1976.

✓ Its address bus is of 16 bit wide.

✓ Its data bus and ALU are of 8-bit.


Syllabus
✓ Requires 5V power supply.

✓ Has 40 pins

✓ It has total 80 instructions

✓ It can operate with 3MHz (Some version can operate with 5MHz).

Dr. Rohit Singh 3


Architecture of 8085

Syllabus

Dr. Rohit Singh 4


Architecture of 8085
✓ ALU
✓ Timing and control unit
✓ General purpose registers
✓ Program status word (Flag register (lower byte))
✓ Program counter
✓ Stack pointer Syllabus
✓ Instruction register and decoder
✓ Interrupt control
✓ Serial I/O control
✓ Address bus
✓ Data bus

Dr. Rohit Singh 5


ALU
✓ It performs data processing function.

✓ In the ALU, in addition to the arithmetic & logic circuits, the ALU includes the
accumulator, which is part of every arithmetic & logic operation.

Functions of Accumulator (8-bit register)


Syllabus
✓ Store 8-bit data
✓ Store the result of an operation
✓ Store 8-bit data during I/O transfer

✓ Also, the ALU includes two temporary register (ACT and TMP) used for holding data
temporarily during the execution of the operation. These temporary registers are not
accessible by the programmer.

Dr. Rohit Singh 6


Timing and control unit
It provides timing and control signal to the microprocessor to perform operations.
Following are the timing and control signals, which control external and internal
circuits –

Control Signals: READY, RD, WR, ALE



Status Signal: S0, S1, IO/M Syllabus
DMA Signals: HOLD, HLDA
RESET Signals: RESET IN, RESET OUT

Description of different signals

READY: It senses whether a peripheral is ready to transfer data or not. If READY is high(1)
the peripheral is ready. If it is low(0) the microprocessor waits till it goes high. It is useful for
interfacing low speed devices.

Dr. Rohit Singh 7


Description of different timing and control signals
𝐑𝐃 : It is a signal to control READ operation. When it is low the selected
memory or input-output device is read.

𝐖𝐑 : It is a signal to control WRITE operation. When it goes low the data on


the data bus is written into the selected memory or I/O location.

ALE : It is an Address Latch Enable signal. It goes high during first T state of a
machine cycle and enables the lower 8-bits of the address, if its value is 1
otherwise data bus is activated. Syllabus

IO/𝐌ഥ : It is a status signal which determines whether the address is for input-
output or memory. When it is high(1) the address on the address bus is for
input-output devices. When it is low(0) the address on the address bus is for the
memory.

S0, S1 : These are status signals. They distinguish the various types of
operations such as halt, reading, instruction fetching or writing.

Dr. Rohit Singh 8


Description of different timing and control signals

Syllabus

Dr. Rohit Singh 9


Description of different timing and control signals
HOLD : It indicates that another device is requesting the use of the address and data bus.
Having received HOLD request the microprocessor relinquishes the use of the buses as soon
as the current machine cycle is completed. Internal processing may continue. After the
removal of the HOLD signal the processor regains the bus.

HLDA : It is a signal which indicates that the hold request has been received. HLDA is set to
low after the removal of HOLD signal. Syllabus

𝐑𝐄𝐒𝐄𝐓 𝐈𝐍 : When the signal on this pin is low(0), the program-counter is set to zero, the
buses are tristate and the microprocessor unit is reset.

RESET OUT : This signal indicates that the MPU is being reset. The signal can be used to
reset other devices.

Dr. Rohit Singh 10


General purpose registers
✓ B, C, D, E, H, and L (8-bit registers) and W, Z are temporary 8-bit registers.
❖ Can be used as singly
❖ Or can be used in pair as 16-bit registers
▪ BC, DE, HL, and WZ
❖ HL can be used as data pointer (holds memory address)
Syllabus
Special Registers

Program counter
It is a 16-bit register used to store the memory address location of the next
instruction to be executed. Microprocessor increments the program counter
whenever an instruction is being executed, so that the program counter points to the
memory address of the next instruction that is going to be executed.

Dr. Rohit Singh 11


Special registers
Stack pointer
It has also a 16-bit register works like stack, which is always incremented/decremented by 2
during push & pop operations.

Program status word (Flag register (lower byte))


Flag register: It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1
depending upon the result stored in the accumulator.
These are the set of 5 flip-flops :
✓ Sign (S)
✓ Zero (Z)
✓ Auxiliary Carry (AC)
✓ Parity (P)
✓ Carry (C)

Dr. Rohit Singh 12


Flag register
Sign flag: This flag is set, when MSB (Most Significant Bit) of the result is 1. Since negative binary
numbers are represented in the 8085 CPU in standard two’s complement notation, S indicates sign of the
result.
1-MSB is 1 (negative)
0-MSB is 0 (positive)

Zero flag: This flag is set, when the result of operation is zero, else it is reset.
1-zero result
0-non-zero result

Auxiliary carry flag: This flag is set whenever there has been a carry out of the lower nibble into the
Syllabus
higher nibble or a borrow from higher nibble into the lower nibble of an 8 bit quantity, else AC is reset.
This flag is used by decimal arithmetic instructions.
1-carry out from bit 3 on addition or borrow into bit 3 on subtraction
0-otherwise

Parity flag: This flag is set whenever the result has even parity, an even number of 1 bits. If parity is odd,
P is cleared.

Carry flag: This flag is set whenever there has been a carry out of, or a borrow into, the higher order bit
of the result.

Dr. Rohit Singh 13


Instruction register and decoder
It is an 8-bit register. When an instruction is fetched from memory then it is stored in the
Instruction register. Instruction decoder decodes the information present in the Instruction
register.

Serial Input/output control


Syllabus
It controls the serial data communication by using these two instructions: SID (Serial input
data) and SOD (Serial output data).

Address bus and data bus


Data bus carries the data to be stored. It is bidirectional, whereas address bus carries the
location to where it should be stored and it is unidirectional. It is used to transfer the data &
Address I/O devices.

Dr. Rohit Singh 14


Address Bus & Data Bus

Syllabus

Dr. Rohit Singh 15


Interrupt control
As the name suggests it controls the interrupts during a process. When a
microprocessor is executing a main program and whenever an interrupt occurs, the
microprocessor shifts the control from the main program to process the incoming
request. After the request is completed, the control goes back to the main program.

There are 5 interrupt signals in 8085 microprocessor:


Syllabus
1. INTR
2. RST 7.5
3. RST 6.5
4. RST 5.5
5. TRAP

Dr. Rohit Singh 16


8085 pin diagram

Dr. Rohit Singh 17


Classification of 8085 signals
The signals of 8085 can be classified into six groups

1. Address bus

2. Data bus

3. Control and status signals

4. Power supply and frequency signals

5. Externally initiated signals

6. Serial I/O ports

Dr. Rohit Singh 18


Classification of 8085 signals

Dr. Rohit Singh 19


Classification of 8085 signals

Dr. Rohit Singh 20


Microprocessor operations
It performs basically three types of function

1. Microprocessor – initiated operations


2. Internal operations
3. Peripheral operations

– initiated operations
MicroprocessorSyllabus

✓ Memory read
✓ Memory write
✓ I/O read
✓ I/O write

Dr. Rohit Singh 21


Microprocessor operations
Internal operations

✓ Store 8-bit data


✓ Performs arithmetic and logical operations
✓ Test for conditions
✓ Sequence the execution of instructions
✓ Store data temporarily during execution in the defined R/W memory
locations
Syllabus

Peripheral operations

✓ Reset
✓ Interrupt
✓ Ready
✓ Hold

Dr. Rohit Singh 22


Interrupts in 8085
Interrupts are the signals generated by the external devices to request the
microprocessor to perform a task.

In 8085, there are 5 interrupts.

✓ TRAP Syllabus

✓ RST7.5
✓ RST6.5
✓ RST5.5
✓ INTR

Dr. Rohit Singh 23


Classification of interrupts
Vector interrupts:
In this type of interrupt, the interrupt address is known to the processor.
For example: TRAP, RST7.5, RST6.5, RST5.5.

Non-vector interrupt:
In this interrupt, the interrupt address is not known to the processor. So, the interrupt address
needs to be sent externally by the device to perform interrupt.
For example: INTR.

Syllabus
Maskable interrupt:
In this type of interrupt, we can disable the interrupt by writing some instructions into the
program.
For example: RST7.5, RST6.5, RST5.5, INTR.

Non-Maskable interrupt:
In this type of interrupt, we cannot disable the interrupt by writing some instructions into the
program.
For example: TRAP.

Dr. Rohit Singh 24


Classification of interrupts
Hardware interrupt:
There are 5 interrupt pins in 8085 used as hardware interrupts.
For example: TRAP, RST7.5, RST6.5, RST5.5, INTR.

Software interrupt:
In this type of interrupt, the programmer has to add the instructions into the program to
execute the interrupt. There are 8 softwareSyllabus
interrupts in 8085.
For example: RST0, RST1, RST2, RST3, RST4, RST5, RST6, and RST7.

Interrupt Service Routine (ISR):


A small program or a routine that when executed, services the corresponding interrupting
source is called an ISR.

Dr. Rohit Singh 25


Summary of interrupts in 8085
Interrupt Type Instructions Trigger Vector
TRAP Non-maskable Independent of EI and DI Level & Edge 0024 H
sensitive
RST7.5 Maskable Controlled by EI and DI Positive edge sensitive 003C H
RST6.5 Maskable Controlled by EI and DI Level sensitive 0034 H
RST5.5 Maskable Controlled by EI and DI Level sensitive 002C H
INTR maskable Controlled by EI and DI Level sensetive 0038 H
Syllabus

0000 H

Software RST0 RST1 RST2 RST3 RST4 RST5 RST6 RST7


Interrupt
Vector 0000 H 0008 H 0010 H 0018 H 0020 H 0028 H 0030 H 0038 H

Dr. Rohit Singh 26


Syllabus

Dr. Rohit Singh 27

You might also like