Professional Documents
Culture Documents
PORT ADDRESSES
REGISTER ADDRESS
CONTROL REGISTER C6
PORT A C0
PORT B C2
PORT C C4
1.
AIM
To initialize port A as an input port in mode-0 and to input the data set by the
switces through port A and store the data at RAM location 4500.
PROGRAM
MVI A,90
OUT C6
IN C0
STA 4500
HLT
2.
AIM
PROGRAM
MVI A,90
OUT C6
IN C0
OUT C2
HLT
3.
AIM
To initialize port C as output port in mode 0 and to output data at port C to glow
the LEDs accordingly.
PROGRAM
MVI A,90
OUT C6
MVI A,80
OUT C4
HLT
4.
AIM
To intialize port C as an output port in mode 0 and to explain the bit set and reset
feature of port C.
PROGRAM
MVI A,80
OUT C6
MVI A,01
OUT C4
MVI A,07
OUT C6
HLT
5.
AIM
To initialize port C as an input port in mode 0 and to input the data using
debounce circuits.
PROGRAM
MOV A,99
OUT C6
IN C4
STA 4500
HLT
6:
AIM
To check the working of 8255 in mode 1
Program
MVI A,B4
OUT C6H
LABEL: IN C4H
ANI 20H
JZ LABEL
IN C0
OUT C2
HLT
14) Traffic Light Controller Interface
Fig 1
Fig 2
Fig 3
fig 4
fig 5
fig 6
fig 7
Fig 8
Repeat the Following
Address
Control Register CE
Counter 0 C8
Counter 1 CA
Counter 2 CA
C0 G0 O0 C1 G1 O1 C2 G2 O2 GND
MOV AL,36
OUT CE,AL
MOV AL,F0
OUT C8,AL
MOV AL,11
OUT C8,AL
HLT