Microprocessor Architecture 21a65c6d0dfa8b13d6916dde15cc7bcb
Microprocessor Architecture 21a65c6d0dfa8b13d6916dde15cc7bcb
Presentation Outline
01 Recap
02 Microprocessor
03 Bus Structure
04 Pin diagram
05 What next?
Syllabus Orientation
Address Bus
From real
world
Input
Memory To real world
Output
8085
MPU
Data Bus
Control Bus
µp initiated operations
• Memory Read
Memory
• Memory Write
• I/O Read
• I/O Write
Peripheral Communication
• Unidirectional 000B
000A
• µp to peripheral devices / memory 0009
0008
0007
• Identify the peripheral / memory location 0006
0005
0004
• 216 memory
locations (1K = 1024 bits) 0003
Address
Data Bus
• Group of 8 lines
• Bidirectional
• 40 pins
8085
• 16 – address lines
• A15 – A8
• Unidirectional – Higher order address
• Control : 𝑹𝑫 and 𝑾𝑹
• RD
• Selected IO or Memory device has to be read
• WR
• Data available on the bus - written in the
se𝐥𝐞𝐜𝐭𝐞𝐝 𝐈/𝐎 𝐨𝐫 𝐌𝐞𝐦𝐨𝐫𝐲 𝐥𝐨𝐜𝐚𝐭𝐢𝐨𝐧
ഥ
𝐈𝐎/ 𝐌
• Status signals
Vcc
+5v power supply
Vss
Ground Reference
XI, X2
A crystal is connected at these two pins.
CLK (OUT)
• INTR / INTA
RESET IN’ –
Pin is low(0)
PC is set to zero
Microprocessor unit is reset.
RESET OUT
Indicates that the MPU is being reset.
Can be used to reset other devices.
DMA Signals
HOLD
• indicates that another device is requesting the use of
the address and data bus
• Relinquishes the use of the buses as soon as the
current machine cycle is completed.
• Removal of the HOLD signal the processor regains the
bus.
HLDA
• Indicates that the hold request has been received
• Removal of a HOLD request, the HLDA goes low.
What Next?
Architecture
Serial I/O
Interrupt Control Control
Instruction W Z
Accumulator Temp. reg. Flags
Register Select
Register B C
D E
Instruction H L
Decoder SP (16)
ALU PC (16)
INC / DEC
(16)
X1
ഥ
𝑰𝑶/ 𝑴 𝑹𝑫 𝑾𝑹 ALE S1 S0 HOLD CLK OUT 𝑹𝑬𝑺𝑬𝑻 𝑰𝑵 Ready Address Bus Data Address Bus
HLDA RESET OUT A8 – A15 AD0 – AD7
Instruction
Accumulator Temp. reg. Flags
Register
Instruction
Decoder
ALU
X1
ഥ
𝑰𝑶/ 𝑴 𝑹𝑫 𝑾𝑹 ALE S1 HOLD CLK OUT Reset S0 Ready
RST RST RST
INTR 𝑰𝑵𝑻𝑨 5.5 7.5 TRAP SID SOD
6.5
Serial I/O
Interrupt Control Control
Instruction W Z
Accumulator Temp. reg. Flags
Register Select
Register B C
D E
Instruction H L
Decoder SP (16)
ALU PC (16)
INC / DEC
(16)
X1
ഥ
𝑰𝑶/ 𝑴 𝑹𝑫 𝑾𝑹 ALE S1 S0 HOLD CLK OUT 𝑹𝑬𝑺𝑬𝑻 𝑰𝑵 Ready Address Bus Data Address Bus
HLDA RESET OUT A8 – A15 AD0 – AD7
Timing and Control Unit
• 𝑹𝑫 and 𝑾𝑹
• Indicate the availability of data on the data bus
Registers
• Accumulator
• Register Array
• General Purpose Registers
• Special Registers
• Program Counter
• Stack Pointer
• Flag Register
• Instruction Register
• Temporary Register
Registers
• Register Array
• GPRs
• B,C,D,E,H,L
• 8 Bit Operations
• HL, BC, DE
• Instruction Register • Register Pair
• Instruction fetched from • 16 bit operations
memory is loaded here • HL – can be used as memory
• Instruction is decoded by the location
instruction decoder • BC, DE – store data
• Not programmable • W, Z
• Temporary registers
• Can’t be accessed by User
• Hold 8 bit data for some
through any instruction instructions
• Unavailable to the
programmer / user
Instruction Decoding and Execution
• A = 82H
MOV C, A [4FH]
Flag Register
Sign Flag
• Parity Flag
• Set – AL operation
• Signed Numbers
Set – result has even number of 1s
• Auxiliary Flag • D7 bit of the result is 1
• Set – Carry by D3 to D4 • Carry Flag
Zero Flag
• Used internally for BCD Set – AL
– operation
Arithmetic
operations • =0 operation
• results
Modifiedin ifa contents
carry in
• Unavailable for the programmer
• Also
• Aborrow for subtraction
& registers change
S Z AC P CY
1
Instruction Format
Add
Operation Code Operand Address
Mode
• Two Byte
• Three Byte
Machine cycles and Bus timings
• Instruction Cycle
• Machine Cycle
• T state
Machine Cycles
8085 has seven machine cycles
1. Opcode Fetch
2. Memory Read
3. Memory Write
4. I/O Read
5. I/O Write
6. Interrupt Acknowledge
7. Bus Idle
Instruction Cycle
• Consists of 3 – 6 T states
T States
External Communication
Memory R/W
I/O – R/W
Request
Acknowledge
Opcode Fetch Machine Cycle
• Called M1 cycle
• 4 T states
• 3 T – fetch the opcode
• 1T – decode and execute the opcode
Timing Diagram
Opcode Fetch
Timing Diagram
Timing Diagram
Introduction to Microprocessor and Buses: 8085
Hardware Architecture, 8085 Pin out, register
organization, instruction format, addressing
modes, instruction set, programming 8085.
Question 1
1. 4, 3, 3
2. 3, 3, 3
3. 3, 4, 3
4. 3, 3, 4
The flags get affected after
1. Arithmetic Operation
2. Logical Operation
• Instruction cycle
• Machine Cycle
• T state
• Timing Diagram
CALL 16-bit address (Call a subroutine)
1.Opcode Fetch
2.Memory Read (Low byte of address)
3.Memory Read (High byte of address)
4.Stack Write (Low byte of PC)
5.Stack Write (High byte of PC)
6.Memory Read (Opcode at subroutine location)
Timing Diagram – MVI A, 32 H
Calculation of execution times