You are on page 1of 4

Vinytics VMC-TLC User's Manual Vinytics VMC-TLC User's Manual

MAIN PROGRAM

Address Opcodes Mnemonics Comments


0400 BA 16 00 MOV DX,0016 ;initilize 8255
0403 B0 80 MOV AL,80
0405 EE OUT DX,AL
0406 B0 10 MOV AL,10 ;go straight signal for
0408 BA 10 00 MOV DX,0010 ;traffic of up/down &
040B EE OUT DX,AL ;stop signal for traffic TRAFFIC LIGHT CONTROLLER
040C BA 12 00 MOV DX,0012 ;of left/right direction
040F EE OUT DX,AL WITH
0410 B0 11 MOV AL,11
0412 BA 14 00 MOV DX,0014 VMC-8609ADP
0415 EE OUT DX,AL
0416 9A 00 05 00 00 CALL 0000:0500 ;call DELAY 1
041B B0 04 MOV AL,04 ;alert signal for traffic
041D BA 10 00 MOV DX,0010 ;of up/down & stop
0420 EE OUT DX,AL ;signal for left/right
0421 BA 12 00 MOV DX,0012 ;direction.
0424 EE OUT DX,AL ;check EOC
0425 9A 50 05 00 00 CALL 0000:0550 ;call DELAY 2
042A B0 41 MOV AL,41 ;stop straight signal for
042C BA 10 00 MOV DX,0010 ;traffic of up/down &
042F EE OUT DX,AL ;left/right direction and
0430 BA 12 00 MOV DX,0012 ;turn right for traffic of
0433 EE OUT DX,AL ;up/down direction.
0434 B0 11 MOV AL,11 ;clear display
0436 BA 14 00 MOV DX,0014
0439 EE OUT DX,AL
043A 9A 00 05 00 00 CALL 0000:0500 ;call DELAY 1
043F B0 04 MOV AL,04 ;alert signal for traffic of
0441 BA 10 00 MOV DX,0010 ;up/down and stop for
0444 EE OUT DX,AL ;traffic of left/right
0445 BA 12 00 MOV DX,0012 ;direction.
0448 EE OUT DX,AL
0449
044E
9A 50
B0 02
05 00 00 CALL
MOV
0000:0550
AL,02
;call DELAY 2
;stop signal for
Vinytics Peripherals Pvt. Ltd.
0450 BA 10 00 MOV DX,0010 ;traffic of up/down &
0453 EE OUT DX,AL ;go straight signal for
www.vinytics.com
0454 BA 12 00 MOV DX,0012 ;traffic of left/right

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.

PORT ADDRESS 8255 III ( CN5)


Port A 10
Port B 12
Port C 14
Control Word Register 16

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

0457 EE OUT DX,AL ;direction.


0458 90 NOP
0459 90 NOP

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)

0477 EE OUT DX,AL ;left/right direction and


(PA6)

0478 BA 12 00 MOV DX,0012 ;turn right for traffic of


GO

047B EE OUT DX,AL ;up/down direction.


(PC6) WAIT
(PC5)

047C B0 22 MOV AL,22 ;clear display


STOP

WAIT
(PA0)

(PA2)

(PC7)

047E BA 14 00 MOV DX,0014


(PA4)

GO

0481 EE OUT DX,AL


0482 9A 50 05 00 00 CALL 0000:0550 ;call DELAY 2
0487 B0 01 MOV AL,01 ;stop straight signal for
0489 BA 10 00 MOV DX,0010 ;traffic of up/down &
048C EE OUT DX,AL ;left/right direction and
(PB4)
WAIT (PC2)
(PC3)

048D BA 12 00 MOV DX,0012 ;turn right for traffic of


GO

(PB2)
WAIT

STOP
(PB0)

0490 EE OUT DX,AL ;up/down direction.


0491 B0 99 MOV AL,99 ;clear display
(PC1)

0493 BA 14 00 MOV DX,0014


(PB6)
GO

0496 EE OUT DX,AL


(PC0)
STOP

0497 9A 00 05 00 00 CALL 0000:0500 ;call DELAY 1


049C B0 01 MOV AL,01 ;stop straight signal for
049E BA 10 00 MOV DX,0010 ;traffic of up/down &
04A1 EE OUT DX,AL ;left/right direction and
04A2 BA 12 00 MOV DX,0012 ;turn right for traffic of
04A5 EE OUT DX,AL ;up/down direction.
04A6 B0 33 MOV AL,33 ;clear display
04A8 BA 14 00 MOV DX,0014
LAYOUT OF TRAFFIC LIGHT CONTROL CARD

4 3
Vinytics VMC-TLC User's Manual Vinytics VMC-TLC User's Manual

04AB EE OUT DX,AL


04AC 9A 50 05 00 00 CALL 0000:0550 ;call DELAY 2 Connector Details at CN1
04B1 E9 52 FF JMP 0406 ;repeat the procedure

DELAY - 1 PC4 PC5


0500 BB 0F 00 MOV BX,000F PC2 PC3
0503 B9 FF FF MOV CX,FFFF
PC0 PC1
0506 49 DEC CX
PB6 PB7
0507 75 FD JNZ 0506
0509 4B DEC BX PB4 PB5
050A 75 F7 JNZ 0503 PB2 PB3
050C C3 RET PB0 PB1
PA6 PA7
DELAY - 2 PA4 PA5
0550 BB 05 00 MOV BX,0005 PA2 PA3
0553 B9 FF FF MOV CX,FFFF
PA0 PA1
0556 49 DEC CX
0557 75 FD JNZ 0556 PC6 PC7
0559 4B DEC BX GND GND
055A 75 F7 JNZ 0553
055C C3 RET

4 5

You might also like