EC2002 8085 Microprocessors: Sachin Kumar Jain
EC2002 8085 Microprocessors: Sachin Kumar Jain
EC2002 8085 Microprocessors: Sachin Kumar Jain
8085 Microprocessors
Stand up
Go to nearest switchboard
Switch Off the FAN
Switch On the Lamp
Sit down
Reviewing Fundamentals
Hardware:
Physical components of any machine or system.
Reviewing Fundamentals
Language:
A medium to communicate with others.
Output
Input
Memory
Veins
CPU
Buses Nerves
I/O
Signal Carriers
Computer Vs Human
CPU/Brain
Output
Input
• Control Events
• Remember Events
• Make Decisions
• Instruct other parts
What is microprocessor ?
Piano generates
notes with its key
and sequential keys
produce ‘Music’.
Evolution of μP
Processor Year Address Bus Data Bus
4004 1971 10 bit 4 bit
8008 1972 14 bit 8 bit
8080 1974 16 bit 8 bit
8085 1976 16 bit 8 bit
8086 1978 20 bit 16 bit
Pentium 1993 32 bit 32 bit
Pentium 4 2000 36 bit 64 bit
8085 Internal Architecture
Address Bus
Logic Unit
Control Bus
D E
Data Bus
(ALU)
H L
Flag Stack Pointer (SP)
Instruction Program Counter (PC)
Decoder
8085
8085 Internal Architecture
Arithmetic Logic Unit (ALU)
Flag Register is also a part of ALU having five flip-flops that serves
as status flag. These flip-flops set or reset after an arithmetic/logical
operation according to the data conditions of the result in the
accumulator.
These flags play crucial role in decision making process of the
microprocessor.
These five flip-flops are part of an 8-bit register, known as Program
Status Word. Its three bits remain undefined. It is presented as:
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
8085 Internal Architecture
Arithmetic Logic Unit (ALU)
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
Sign Flag (S): After any operation if the MSB (B(7)) of the result is 1, it indicates
the number is negative and the sign flag becomes set, i.e. 1. If the MSB is 0, it
indicates the number is positive and the sign flag becomes reset.
Zero Flag (Z): After any arithmetical or logical operation if the result is 0 (00)H,
the zero flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.
Auxiliary Carry Flag (AC): This flag is used in the BCD number system(0-9).
If after any arithmetic or logical operation D(3) generates any carry and passes it on to
D(4) this flag becomes set i.e. 1, otherwise, it becomes reset i.e. 0. This is the only
flag register that is not accessible by the programmer.
8085 Internal Architecture
Arithmetic Logic Unit (ALU)
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
Parity Flag (P): If after any arithmetic or logical operation the result has even
parity, an even number of 1 bit, the parity register becomes set i.e. 1, otherwise it
becomes reset i.e. 0.
Carry Flag (CY): Carry is generated when performing n bit operations and the
result is more than n bits, then this flag becomes set i.e. 1, otherwise, it becomes reset
i.e. 0. During subtraction (A-B), if A>B it becomes reset, and if (A<B) it becomes set.
Carry flag is also called the borrow flag.
8085 Internal Architecture
Instruction Register & Decoder
Program Counter
Program Counter holds the address value of the memory to the next
instruction that is to be executed. It is a 16-bit register.
8085 Internal Architecture
Stack Pointer
Storage
Prime Memory
Memory
Erasable Permanent
Dynamic
Memory Memory
R/WM
8085: How it works ?
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
2010
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
2010 31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
2010 31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
2010 31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
2010 31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
Program Counter contents are
send to address bus to locate the Output Buffer
40
instruction in memory. 1C
4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
uP sends memory read command
Output Buffer
signal to memory chip. 40
1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
40
As soon as Read signal reaches to the Output Buffer
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
40
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
40
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
40
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
40
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
40 4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
40
Accumulator Register Array
Arithmetic & B C
Address Bus
Bus
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction
40 PC : 2010
Input Buffer
Decoder
Microprocessor
8085: How it works ?
This data called OPCODE is than Output Buffer
40
transferred to Instruction Register. 1C
4E
31
Address Decoder
6A
MEMR (Read Command) 12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Instruction PC : 2010
Input Buffer
Decoder (40)
Microprocessor
8085: How it works ?
Input Buffer
Microprocessor than acts according to the 40
1C
instruction received. PC incremented. 4E
31
Address Decoder
6A
12
Logic Unit
Data Bus
D E
(ALU)
H L
Control
Microprocessor