Trafic Light Controller: Mpi Lab Mini Project

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

MPI LAB MINI PROJECT

TRAFIC LIGHT CONTROLLER

- by
G.Damodar Reddy(CS8788)
D.Sravan Kumar(CS8781)
Aim:
The main aim of this project is to design a Traffic light controller by interfacing
scantech (7 segment Display) to 8086 microprocessor.

Equipment:
8086 Microprocessor trainer kit, Power supply, 7 segment display scantech,
Connector.

Theory:
The 8086 Microprocessor is a popular Microprocessor used in Industries for
various applications. Such as traffic light control, temperature control, stepper
motor control, etc. In this project, the traffic lights are interfaced to
Microprocessor system through buffer and ports of programmable peripheral
Interface 8255. So the traffic lights can be automatically switched ON/OFF in
desired sequence. The Interface board has been designed to work with parallel
port of Microprocessor system.
The hardware of the system consists of two parts. The first part is
Microprocessor based system with 8086. Microprocessor as CPU and the
peripheral devices like EPROM, RAM, Keyboard & Display Controller 8279,
Programmable as Peripheral Interface 8255, 24 pin parallel port connector, 16 keys
Hexa key pad and eight number of seven segment LED’s.
The second part is the 8X8 LED interface board, which consist of 64 LED’s
The LED’s can be switched ON/OFF in the specified sequence by the
Microprocessor.
The block diagram of the system is shown in fig.1. The lay out of the traffic
light is shown in fig 2.
26 pin
FRC cable

26 pin port connector


Buffer

26 pin port connector


8086
AD0-AD7 Latch A0-A7 8255
CPU
PPI

D0-D7

System Bus

8279 Anode driver


keyboard
EPROM RAM Display
Controller Display

Decoder
Keyboard
Cathode driver

Working:
The hex keypad with 8x8 LED board is interfaced to the 8086 microprocessor. The
program is loaded into the 8086 microprocessor and executed. The sequence is
observed on the LEDs.

SEQUENCE:
Two lights 1 and 8 of forth and fifth column collectively represent green light.

Two lights 3 and 6 of fourth and fith column collectively represent red light.

The lights 2 and 7 of fifth row represent yellow line.


signal 1:

signal 1 shows the condition of road.

X X
X x
X X X X X X

X X X x X X

X X
X X
Signal 2:

Signal 2 shows the horizontal movement of vehicles I.e., red light on the vertical
rows and green light on the horizontal roads.

X O O X

X x
X X X X X X

O O
O O
X X X x X X

X X
X O O X
Signal 3: this signal shows red on the horizontal road and yellow on the vertical
roads.

X X
X O x
X X X X X X

O O
O O
X X X x X X

X O X

X X

Signal 4:
This signal shows redon the both vertical roads and green on the horizontal roads.

X X
X x
X X X O O X X X

O O
O O
X X X O O x X X

X X
X X
Signal 5:

This signal shows yellow on the both horizontal roads and green on the vertical
roads.

X O O X

X x
X X X X X X

O O
X X X x X X

X X
X O O X

Assembly Language Program:

MOV DX,8807
MOV AL,80
OUT DX,AL

MOV SI,1000
C: MOV DI,1500
B: MOV CX,8
A: MOV BL,[SI]
MOV DX,8805
MOV AL,BL
OUT DX,AL

MOV DX,8801
MOV AL,[DI]
OUT DX,AL
INC SI
INC DI
PUSH CX
MOV CX,0FF
D: LOOP D
LOOP A
MOV SI,1000
MOV AH,8
F: MOV CX,FFFF
E: LOOP E
SUB AH,1
CMP AH,0
JNE F
CMP DI,1528
JNE B
JE C

RESULT:
The output is seen on the led board.

You might also like