Micro Lecture 4,5 &6
Micro Lecture 4,5 &6
1
2
8085 Microprocessor
External Pins of the 8085 can be broadly divided in following
categories
• Address and Data Bus
• Control Signals
• Power Supply and Clock Frequency
• Interrupts and Peripheral Initiated Signals
• Reset Signals
• Reset Signals
• Serial I/O Ports
3
Address and Data Bus
The address bus has 8 signal lines, A8-A15, which are
unidirectional.
The other 8 address bits are multiplexed (time shared) with
data bits in AD0-AD7.
The bits AD0-AD7 are bidirectional and serve as A0-A7
and D0-D7 at the same time.
During the execution of the instruction, these lines carry
the address bits during the early part, then during the
late parts of the execution, they carry the 8 data bits.
In order to separate the address from the data, we can use a
latch to save the value before the function of the bits
changes.
4
Control Signals
5
Control Signals
• RD – It is a signal to control READ operation. When it
is low the selected memory or input-output device is
read.
• WR – 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.
• 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.
6
Control Signals
7
Power Supply and Clock Frequency
8
Interrupts and Peripheral Initiated
Signals
The 8085 has five interrupt signals that can be used to interrupt a program
execution.
(i) INTR
(ii) RST 7.5
(iii) RST 6.5
(iv) RST 5.5
(v) TRAP
The microprocessor acknowledges Interrupt Request by INTA’ signal.
• INTR – It is an interrupt request signal.
• INTA’ – It is an interrupt acknowledgment sent by the microprocessor after
INTR is received.
In addition to Interrupts, there are three externally initiated signals namely
RESET, HOLD and READY. To respond to HOLD request, it has one signal
called HLDA.
9
Reset Signals
10
DMA Signals
11
DMA Signals
• HOLD: Whenever an externally connected peripheral I/O
Device wants to transmit/receive any data from the
internal-memory of 8085 microprocessor, it requires to use
HOLD pin of 8085.
• External device has to set input High to the HOLD pin,
then 8085 leave the control of buses and transfers the
control to the external device and sets HLDA high.
• By this method external device can fetch data from internal
memory of 8085 using data and address bus. If external
device has to transfer control of buses back to 8085, it set
HOLD again low.
12
Serial I/O Ports
13
The 8085 Bus Structure
The 8-bit 8085 CPU (or MPU – Micro Processing Unit)
communicates with the other units using a 16-bit address
bus, an 8-bit data bus and a control bus.
14
The 8085 Bus Structure
Address Bus
Consists of 16 address lines: A0 – A15
15
The 8085 Bus Structure
Data Bus
Consists of 8 data lines: D0 – D7
Operates in bidirectional mode: The data bits are
sent from the MPU to peripheral devices, as well
as from the peripheral devices to the MPU.
16
The 8085: CPU Internal Structure
17
The 8085: CPU Internal Structure
18
The 8085: Registers
19
The 8085: CPU Internal Structure
Registers
Six general purpose 8-bit registers: B, C, D, E, H, L
21
Stack Pointer (SP)
22
Flag Register
23
Sign Flag (S)
24
Example
25
Zero Flag (Z)
26
Example
27
Auxiliary Cary Flag (AC)
• This flag is used in BCD number system(0-9). If after
any arithmetic or logical operation D(3) generates
any carry and passes on to B(4) this flag becomes
set i.e. 1, otherwise it becomes reset i.e. 0.
• This is the only flag register which is not accessible
by the programmer1-carry out from bit 3 on addition
or borrow into bit 3 on subtraction
0-otherwise
28
Parity Flag (P)
29
Carry Flag (CY)
30
Interrupts
31
Hardware and Software Interrupts
32
Vectored and Non-Vectored Interrupts
33
Mask-able Interrupts
34
Non-Mask-able Interrupts
35
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.
36
Example: Memory Read Operation
37
Example: Instruction Fetch Operation
38
Example: Instruction Fetch Operation
39
Example: Instruction Fetch Operation
40
8085 Functional Block Diagram
41
Addressing Modes
44
Immediate addressing mode
45
Register addressing mode
46
Direct addressing mode
47
Indirect addressing mode
48
Implied addressing mode
49