Professional Documents
Culture Documents
MAIN PROGRAM
2
Vinytics VMC-TLC User's Manual Vinytics VMC-TLC User's Manual
INTRODUCTION
In this modern life, the number of vehicles increase more day by
day. The increase of vehicle may cause accidents and other
problems on the road. Controlling traffic at regular intervals of time
with accuracy and uniformity has become a necessity to avoid
accidents, discomfort of drivers. The microprocessor controls the
traffic signals very effectively and with accurate timings.
The module “Traffic Light Control Card” based on the microprocessor
and Programmable Peripheral Interface (PPI). This Traffic Light
Control Card uses the ports of Programmable Peripheral Interface
(PPI) 8255. We use ports A&C of 8255 of Vinytics make
Microprocessor Kits. The students can easily understand the working
of traffic light controls which they see at the crossings. The main
motto of Vinytics is to clear the fundamentals to students about the
microprocessors.
One can change the sequence and time delay between two signals
by implementing the logic. The program for control of traffic lights
is as follows.
1. Connect +5V and GND to the module from the power supply.
2. Connect 26 pin FRC Cable from 8255-III (CN5) of the kit to the
module as per the polarity.
3. Enter the programme from 400 memory address of the kit.
4. Execute the programme from 400 memory address of the kit.
5. Observe the status of LEDs on the module.
1
Vinytics VMC-TLC User's Manual Vinytics VMC-TLC User's Manual
CN2
CN1
045A 90 NOP
GND
+5V
NC
NC
045B 90 NOP
045C 90 NOP
045D B0 01 MOV AL,01 ;stop straight signal for
045F BA 10 00 MOV DX,0010 ;traffic of up/down &
0462 EE OUT DX,AL ;left/right direction and
0463 BA 12 00 MOV DX,0012 ;turn right for traffic of
0466 EE OUT DX,AL ;up/down direction.
0467 B0 44 MOV AL,44 ;clear display
0469 BA 14 00 MOV DX,0014
046C EE OUT DX,AL
046D 9A 00 05 00 00 CALL 0000:0500 ;call DELAY 1
0472 B0 01 MOV AL,01 ;stop straight signal for
0474 BA 10 00 MOV DX,0010 ;traffic of up/down &
STOP
(PC4)
WAIT
(PA0)
(PA2)
(PC7)
GO
(PB2)
WAIT
STOP
(PB0)
4 3
Vinytics VMC-TLC User's Manual Vinytics VMC-TLC User's Manual
4 5