Académique Documents
Professionnel Documents
Culture Documents
TRAFFIC LIGHT
CONTROLLER
INTERFACING
CARD
INDEX
SPECIFICATION………………..............…………. 2
INTRODUCTION……………............…………… 3
FLOW CHART……………………........……….. 5
PROGRAMS…..…………………........………… 6
CIRCUIT DIAGRAM……………........……….. 18
BLOCK DIAGRAM……………….........………. 19
WARRANTY…………………........…………….. 20
1
MIC‐12
SPECIFICATION
Traffic Light Controller Interfacing Module (IC‐ 12)
• East. west, north south posts are defined on the PCB for the
square.
• For each post four LED is provided in Red. Amber & Green
color.
2
MIC‐12
INTRODUCTION
In this modern life, the number of vehicles increases 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.
Circuit Description:
In this Traffic Light Module one square is shown which has four ends
called East, Vest, and North &. South. The Traffic Light Module is
interfaced with Port A and Port C of 8255. Port A is connected with
North and South LEDs. Port C is connected with East and West LEDs.
Each end has four LEDs called Stop. Start, and GO straight & GO
LEFT
Port A
NORTH SOUTH
Port B
EAST WEST
3
MIC‐12
Hardware Installation:
• Connect Traffic Light Controller Module to 8255-1 of
8051/8085/8086 Trainer Kit through 26 pin FRC Cable.
• Be sure about the direction of the cable i.e. Pin No. 1 of Module
should be connected to Pin No. 1 of 8255 connector.
• Connect +5V, GND from the Trainer Kit (+5V & GND signals
are available in the 25 & 26 pin of FRC 8255-I Connector)
Software Installation:
• Enter the program from 2000 Location for 8085/8051 Kit / 0400
for 8086 Kit/3000 for 8051 LCD Kit and make sure that your
program is entered properly before execution.
4
MIC‐12
M
FLLOW CH
HART
5
MIC‐12
PROGRAMS
Program for 8085 LED Trainer Kit
8255 Port Address
Port A -00
Port B -01
Port C -02
Control Word -03
Program‐
This program controls Traffic Light of One Square. By changing the
delay between Two Signals one can change the Speed of Traffic.
7
MIC‐12
Program for 8085 LCD Trainer Kit
8255 Port Address
PortA -00
PortB -01
PortC -02
Control Word -03
Program‐
This program controls Traffic Light of One Square. By changing the
delay between Two Signals one can change the Speed of Traffic.
Address Opcodes Label Mnemonics Comments
2000 3E80 MVI A,80 ;SetAll PortsasOutput
2002 D3 03 OUT 03
2004 3E 11 MVI A, 11 ;Set All Square Red (Stop)
2006 D3 00 OUT 00
2008 D3 02 OUT 02
200A CD 50 20 CALL 2050 ; Call Delay 10nec
200D 3E 44 Loop : MVI A, 44 ; Green (Go Led) of N & S
200F D3 00 OUT 00 ; Red (Stop Led) of E&W
2011 CD 50 20 CALL 2050 ; Call Delay 1OMSEC
2014 3E 22 MVI A, 22
2016 D3 00 OUT 00 ; Amber(caution)of N&S
9
MIC‐12
Program for 8051 LED Trainer Kit
8255 Port Address
Port A -FF00
Port B -FF01
Port C -FF02
Control Word -FF03
Program‐
This program controls Traffic Light of One Square By changing the
delay between Two Signals one can change the Speed of Traffic.
10
MIC‐12
Address Opcodes Label Mnemonics Comments
202B 12 20 5F LCALL DELAY2 ; Call Delay 5 MSEC
202E 74 11 MOV A, #11
2030 F0 MOVX @DPTR, A ; Set Red (Stop) of N&S
2031 74 44 MOV A, #44
2033 90 FF 02 MOV DPTR, #0FF02
2036 F0 MOVX @DPTR,A ; Green(Go) of E&W
2037 12 20 52 LCALL DELAY1 ; Call Delay 10 msec
203A 7422 MOV A, #22
203C F0 MOVX @DPTR, A ;Amber (caution) of E&W
203D 12 20 5F LCALL DELAY2 ; Call Delay 5 msec
2040 7499 MOV A, #99
2042 F0 MOV X @DPTR, A ;Green (go right) of E&W
2043 12 20 52 LCALL DELAY1 ; Call Delay 10 msec
2046 7422 MOV A, #22
2048 F0 MOVX @DPTR, A ; Amber (caution) of E&W
2049 12 20 5F LCALL DELAY2 ; Call Delay 5 msec
204C 74 11 MOV A, #11
204E F0 MOVX @DPTR, A ; Red (Stop) for E & W
204F 02 20 13 LJMP LOOP ; Jump to Loop
2052 7925 Delay l: MOV R1, #25 ; 10 msec Delay Routine
2054 7A 00 DL3: MOV R2, #00
2056 7B00 DL2: MOV R3,#00
2058 DB FE DL1: DJNZ R1 DLI
205A DA FA DJNZ R1 DL2
205C D9 F6 DJNZ R1,DL3
205E 22 RET
205F 79 05 Delay 2: MOV R1, #05 ; 5 msec Delay Routine
2061 7A 00 DL6: MOV R2, #0
2063 7B 00 DL5: MOV R3, #0
2065 DB FE DL4: DJNZ R3, DL4
2067 DA FA DJNZ R2, DL5
2069 D9F6 DJNZ R1, DL6
206B 22 RET
11
MIC‐12
Program for 8051 LCD Trainer Kit
8255 Port Address
PortA -FF00
PortB -FF01
PortC -FF02
Control Word -FF03
Program‐
This program controls Traffic Light of One Square By changing the
delay between Two Signals one can change the Speed of Traffic.
12
MIC‐12
Address Opcodes Label Mnemonics Comments
302B 12305F LCALL 305F ; Call Delay 5 MSEC
302E 74 11 MOV A, #11
3030 F0 MOVX @DPTR, A;Set All Square Red (Stop)
3031 74 44 MOV A, #44
3033 90 FT 02 MOV DPTR, #FF02
3036 F0 MOVX @DPTR,A; Set Green (Go) of E&W
3037 12 30 52 LCALL 3052 ; Call Delay 1OMSEC
303A 74 22 MOV A, #22
303C F0 MOVX @DPTR, A ; Amber (caution) of E&W
303D 12 20 5F LCALL 305F ; Call Delay 5 MSEC
3040 7499 MOV A, #99
3042 F0 MOV X @DPTR,A ; Green (go right) of N&S
3043 122052 LCALL 3052 ; Call Delay 1OMSEC
3046 7422 MOV A, #22
3048 F0 MOV X @DPTR, A; Amber (caution) of E&W
3049 12 30 5F LCALL 305F ; Call Delay 5 MSEC
304C 74 11 MOV A, #11
304E F0 MOVX @DPTR, A ; Red(Stop) for E & W
304F 0230 13 LJMP 3013 ; Jump to Loop
3052 7925 Delay l: MOV R1, #25 ; 10 msec Delay Routine
3054 7A 00 DL3: MOV R2, #00
3056 7B00 DL2: MOV R3, #00
3058 DB FE DL1: DJNZ R1,3058
305A DA FA DJNZ R1,3056
305C D9F6 DJNZ R1,3054
305E 22 RET
305F 79 05 Delay2: MOV R1, #05 ; 5 msec Delay Routine
3061 7A 00 DL6: MOV R2, #00
3063 7B 00 DL5: MOV R3, #00
3065 DB FE DL4: DJNZ R3,3065
3067 DA FA DJNZ R2, 3063
3069 D9F6 DJNZ R1, 3061
306B 22 RET
13
MIC‐12
Program for 8086 LED Trainer Kit
8255 Port Address
Port A -FFF8
Port B - FFFA
Port C - FFFC
Control Word - FFFE
Program
This program controls Traffic light of One Square. By changing the &
lay between Two Signals one can change the Speed of Traffic.
Address Opcodes Label Mnemonics Comments
0400 B0 80 MOV AL, 80 ; INIT 8255 CWR
0402 BA FE FF MOV DX, FFFE ; Set All Ports as Output
0405 EE OUT DX, AL ; Set All Square Red (Stop)
0406 B0 11 MOV AL, 11 ; Out at Port –A
0408 BA F8 FF MOV DX, FFF8; Out at Port –C
040B EE OUT DX, AL ; Call Delay 10M SEC
040C BA FC FF MOV DX, FFFC ; Set Green (Go) of N&S
040F EE OUT DX, AL ; Set Red (Stop) of E&W
0410 E8 56 00 Call Delay l ; Out at Port-A
0413 B0 44 STRT: MOV AL,44 ; Call Delay 10M SEC
0415 BA F8 FF MOV DX, FFF8 ; Amber (caution) of N & S
0418 EE OUT DX, AL ; Out at Port-A
0419 E8 4D 00 Call Delay l ; Call Delay 5 MSEC
041C B0 22 MOV AL, 22
041E BA F8 FF MOV DX, FFF8 ; Set all Square Red (Stop)
0421 EE OUT DX, AL
0422 E8 51 00 Call Delay2
0425 B099 MOV AL,99
0427 BA F8 FF MOV DX, FFF8 ; Green (Go-Left) of N & S
042A EE OUT DX, AL ; Out at Port-A
042B E8 3B 00 Call Delay l ; Call Delay 10 msec
042E B0 22 MOV AL, 22 ; Set Amber (caution)
0430 BA F8 FF MOV DX, FFF8
0433 EE OUT DX, AL ; Out at Port-A
0434 E8 3F 00 Call Delay2 ; Call Delay 5 MSEC
0437 BA F8 FF MOV DX, FFF8
14
MIC‐12
Address Opcodes Label Mnemonics Comments
043A B0 11 MOV AL, 11 ;Set all Square Red(Stop)
043C EE OUT DX, AL ; Out at Port -A
043D B0 44 MOV AL, 44 ; green (go) of E & W
043F BA FC FF MOV DX, FFFC
0442 EE OUT DX,AL ;Out at Port -C
0443 E8 23 00 Call Delay l ; Call Delay 10M SEC
0446 B0 22 MOV AL, 22 ;Amber (caution) of E&W
0448 BA FC FF MOV DX,FFFC
044B EE OUT DX, AL ; Out at Port -C
044C E8 2700 Call Delay2 ; Call Delay 5 MSEC
044F BA FC FF MOV DX, FFFC ; Set all square red (stop)
0452 B0 99 MOV AL, 99 ; Green (Go-Left) of E&W
0454 EE OUT DX, AL ; Out at Port -C
0455 E8 11 00 Call Delay l ; Call Delay 10M SEC
0458 B0 22 MOV AL, 22 ; Amber (caution) of E&W
045A BA FC FF MOV DX, FFFC
045D EE OUT DX, AL ; Out at Port -C
045E E8 1500 Call Delay2 ; Call Delay 5 MSEC
0461 B0 11 MOV AL, 11 ; Set all Square Red (Stop)
0463 BA FC FF MOV DX, FFFC
0466 EE OUT DX, AL ; Out at Port -C
0467 EB AA JMP START ; Jump to Start
0469 BB 0F 00 Delay l: MOV BX,000F ; 10 msec Delay Routine
046C B9 FF FF DL2: MOV CX, FFFF
046F 49 DL1: DEC CX
0470 75 FD JNZ DL1
0472 4B DEC BX
0473 75 F7 JNZ DL2
0475 C3 RET
0476 BB 05 00 Dly2: MOV BX, 0005 ; 5 msec Delay Routine
0479 B9 FF FF DL4: MOV CX, FFFF
047C 49 DL3: DEC CX
047D 75 FD JNZ DL3
047F 4B DEC BX
0480 75F7 JNZ DL4
0482 RET
15
MIC‐12
Program for 8086 LCD Trainer Kit
8255 Port Address
PortA -70
PortB -72
PortC -74
Control Word -76
Program‐
This program controls Traffic Light of One Square. By changing the
delay between Two Signals one can change the Speed of Traffic.
16
MIC‐12
Address Opcodes Label Mnemonics Comments
042B E6 70 OUT 70, AL ; Out at Port-A
042D B0 44 MOV AL, 44 ; Green (Go) of E & W
042F E6 74 OUT 74,AL ; Out at Port-C
0431 E81B 00 CALL 044F ; Call Delay 10M SEC
0434 B0 22 MOV AL, 22 ; Amber (caution) of E& W
0436 E6 74 OUT 74, AL ; Out at Port -C
0438 E8 2100 CALL 045C ; Call Delay 5 MSEC
043B B0 99 MOV AL,99 ; Start SquareRed(Stop)
0430 E6 74 OUT 74,AL ; Green(go-left) of E&W
out at port- c
043F E8 0D 00 CALL 044F ; Call Delay 10M SEC
0442 B022 MOV AL,22 ;Amber (caution) of E&W
0444 E6 74 OUT 74,AL ; Out at Port -C
0446 E8 13 00 CALL 045C
0449 B0 11 MOV AL, 11 ; Set all Square Red(Stop)
044B E6 74 OUT 74,AL ; Out at Port-C
044D EB BE JMP 040D ; Jump to Start
044F BB 0F 00 Delay l: MOV BX, 000F ; 10 msec Delay Routine
0452 B9 FF FF DL2: MOV CX, FFFF
0455 49 DL1: DEC CX
0456 75 FD JNZ 0455
0458 4B DEC BX
0459 75 F7 JNZ 0452
045B C3 RET
045C BB 05 00 Dly2: MOV BX, 0005 ; 5 msec Delay Routine
045F B9 FF FF DL4: MOV CX, FFFF
0462 49 DL3: DEC CX
0463 75 FD JNZ 0462
0465 4B DEC BX
0466 75 F7 JNZ 045F
0468 C3 RET
17
MIC‐12
M
CIRC
CUIT DIA
AGRAM
18
M
MIC‐12
BLO
OCK DIAG
GRAM
19
MIC‐12
WARRANTY
1. We guarantee the instrument against all manufacturing defects
during 24 months from the date of sale by us or through our dealers.
2. The guarantee covers manufacturing defects in respect of indigenous
components and material limited to the warranty extended to us by
the original manufacturer, and defect will be rectified as far as lies
within our control
3. The guarantee will become INVALID.
a) If the instrument is not operated as per instruction given in the
instruction manual.
b) If the agreed payment terms and other conditions of sale are not
followed.
c) If the customer resells the instrument to another party.
d) Provided no attempt have been made to service and modify the
instrument.
4. The non-working of the instrument is to be communicated to us
immediately giving full details of the complaints and defects noticed
specifically mentioning the type and sr. no. of the instrument, date of
purchase etc.
5. The repair work will be carried out, provided the instrument is
dispatched securely packed and insured with the railways. To and fro
charges will be to the account of the customer
DISPATCH PROCEDURE FOR SERVICE
Should it become necessary to send back the instrument to factory
please observe the following procedure.
1) Before dispatching the instrument please write to us giving fully
details of the fault noticed.
2) After receipt of your letter our repairs dept. will advise you
whether it is necessary to send the instrument back to us for
repairs or the adjustment is possible in your premises.
Dispatch the instrument (only on the receipt of our advice) securely
packed in original packing duly insured and freight paid along with
accessories and a copy of the details noticed to us at our factory
address.
20
MIC‐12
NOTES
21