You are on page 1of 16

13) 8255 - PPI INTERFACING

PORT ADDRESSES

REGISTER ADDRESS
CONTROL REGISTER C6
PORT A C0
PORT B C2
PORT C C4

Port C pattern in board

PC7 PC5 PC3 PC1 PC0 PC6 PC4 PC2

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

To initialize port A as input port and port B as output port in mode-0.

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

12 > Port C Fig 1


27 > Port B
44 > Port A
Call Delay
48 >Port A Fig 2
Call Delay1
10 > Port C Fig 3
2B > Port B
92 > Port A
Call Delay
4B > Port B Fig 4
Call Delay1
10 > Port C Fig 5
9D > Port B
84 > Port A
Call Delay
20 > Port C Fig 6
Call Delay1
48 > Port C Fig 7
2E > Port B
84 > Port A
Call Delay
49 > Port C Fig 8
04 > Port A
Call Delay1
15) 8253 –Programmable Interval Timer Interfacing

Address
Control Register CE
Counter 0 C8
Counter 1 CA
Counter 2 CA

(Processor Address lines A2 and A1 are connected to A1 and A0 of 8253 )

Connections on the board

C0 G0 O0 C1 G1 O1 C2 G2 O2 GND

1. Square Wave Generator – Mode 3

MOV AL,36
OUT CE,AL
MOV AL,F0
OUT C8,AL
MOV AL,11
OUT C8,AL
HLT

You might also like