Unit 4
Unit 4
in 1
Microprocessor is an electronic circuit that
functions as the central processing unit (CPU) of a
computer, providing computational control.
Microprocessors are also used in other advanced
electronic systems,such as computer printers,
automobiles, and jet airliners
Microprocessor: A silicon chip that contains a CPU.
SID: Serial input data is input pin used to accept serial 1 bit data .
X1X2 :These are clock input signals and are connected to external
LC,or RC circuit.These are divide by two so if 6 MHz is connected to
X1X2, the operating frequency becomes 3 MHz.
S Z X AC X P X CY
S:Sign flag is set when result of an operation is negative.
Z:Zero flag is set when result of an operation is 0.
Ac:Auxiliary carry flag is set when there is a carry out of
lower nibble or lower four bits of the operation.
CY:Carry flag is set when there is carry generated by an
operation.
P:Parity flag is set when result contains even number of 1’s.
Rest are don’t care flip flops.
Register Group
Temporary registers (W,Z):These are not available for
user. These are loaded only when there is an operation
being performed.
General purpose:There are six general purpose registers
in 8085 namely B,C,D,E,H,L.These are used for various
data manipulations.
Special purpose :There are two special purpose registers
in 8085:
1. SP :Stack Pointer.
2. PC:Program Counter.
Register Group
Stack Pointer: This is a temporary storage memory 16 bit
register. Since there are only 6 general purpose registers,
there is a need to reuse them .
Whenever stack is to be used previous values are PUSHED
on stack and then after the program is over these values are
POPED back.
Program Counter: It is 16 bit register used to point the location
from which the next instruction is to be fetched.
When a single byte instruction is executed PC is
automatically incremented by 1.
Upon reset PC contents are set to 0000H and next
instruction is fetched onwards.
INSTRUCTION REGISTER,DECODER & CONTROL
SERIAL IO CONTROL
GROUP
• It is used to accept the serial 1 bit data by
using SID and SOD signals and it can be
performed by using SIM & RIM
instructions.
INSTRUCTIONS SET OF 8085
DATA TRANSFER GROUP
MOV Rd, Rs.(Move data from Rs to Rd).
Example:
MOV C,B. Move the content of register B to C.
Initially After execution
B=10H. B=10H.
C=20H. C=10H.
Flags Affected :No flags affected.
Addressing mode: Register.
DATA TRANSFER GROUP
MOV Rd, M (Move data from Memory to Rd).
Example:
MOV C,M. Move the content of Memory i.e. “H or L” to C.
Suppose the Data at memory pointed By HL pair at C200H is
10H.
Initially After execution
H=C2,L=00,C=30H H=C2,L=00,C=10H.
Flags Affected :No flags affected.
Addressing mode: Indirect.
DATA TRANSFER GROUP
MVI R, Data.(Move Immediate data to Register).
Example:
MVI B, 30H. (Move the data 30 H to Register B)
Initially After execution
B=40H B=30H
Flags Affected :No flags affected.
Addressing mode: Immediate.
DATA TRANSFER GROUP
LXI Rp,16 bit .(Load 16 bit data to Register pair Immediate).
Example:
LXI SP, C200H. (Load Stack pointer with C200H).
Initially After execution
SP=C800H SP=C200H.
Flags Affected :No flags affected.
Addressing mode: Immediate.
DATA TRANSFER GROUP
STA address.(Store Acc data to address).
Example:
STA C200H. (Move the data from Acc to C200H).
Suppose in Acc the data is 10H.
Initially After execution
A=10H, C200=20H C200=10H , A=10H
Flags Affected :No flags affected.
Addressing mode: Direct.
DATA TRANSFER GROUP
LHLD address.(Load HL pair with data from address).
Example:
LHLD C200H. (Move the data from C200 to HL pair).
Suppose at C200 the data is 20H,30H .
Initially After execution
H=10H,L=20H H=20H,L=30H.
C2=20H,00=30H C2=20H,00=30H
[email protected] 21-Nov-2010 67