0% found this document useful (0 votes)
139 views

Hardware For Traffic Signal Control: Statement

This document describes a microprocessor system to control traffic signals at an intersection with traffic flowing north-south and east-west. The system uses an 8255 programmable peripheral interface chip to control 12 relays and electric bulbs that indicate the traffic signals. Software is provided to cycle through the traffic light patterns, spending 20 seconds for each direction before a 5 second yellow transition period. Port A controls the north-south lights and Port B the east-west lights by sending data to activate the appropriate relays.

Uploaded by

Arindam Dutta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Hardware For Traffic Signal Control: Statement

This document describes a microprocessor system to control traffic signals at an intersection with traffic flowing north-south and east-west. The system uses an 8255 programmable peripheral interface chip to control 12 relays and electric bulbs that indicate the traffic signals. Software is provided to cycle through the traffic light patterns, spending 20 seconds for each direction before a 5 second yellow transition period. Port A controls the north-south lights and Port B the east-west lights by sending data to activate the appropriate relays.

Uploaded by

Arindam Dutta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Statement: 

Design a microprocessor system to control traffic signals. The


traffic light arrangement is as shown in Fig. The traffic should be controlled
in the following manner.
1) Allow traffic from W to E and E to W transition for 20 seconds. 2) Give
transition period of 5 seconds (Yellow bulbs ON) 3) Allow traffic from N to 5
and 5 to N for 20 seconds 4) Give transition period of 5 seconds (Yellow bulbs
ON) 5) Repeat the process.

HARDWARE FOR TRAFFIC SIGNAL CONTROL

Fig. shows the interfacing diagram to control 12 electric bulbs. Port A is used
to control lights on N-S road and Port B is used to control lights on W-E road.
Actual pin connections are listed in Table 1 below.

The electric bulbs are controlled by relays. The 8255 pins are used to control
relay on-off action with the help of relay driver circuits. The driver circuit
includes 12 transistors to drive 12 relays. Fig. also shows the interfacing of
8255 to the system.

INTERFACING DIAGRAM
SOFTWARE FOR TRAFFIC LIGHT CONTROL
Source program:

        MVI A, 80H                              : Initialize 8255, port A and port B


        OUT 83H (CR)                    : in output mode
START: MVI A, 09H
        OUT 80H (PA)                    : Send data on PA to glow R1 and R2
        MVI A, 24H
        OUT 81H (PB)                    : Send data on PB to glow G3 and G4
        MVI C, 28H                              : Load multiplier count (40ıο) for
delay
        CALL DELAY                              : Call delay subroutine
        MVI A, 12H
        OUT (81H) PA                    : Send data on Port A to glow Y1 and Y2
        OUT (81H) PB                    : Send data on port B to glow Y3 and Y4
        MVI C, 0AH                              : Load multiplier count (10ıο) for
delay
CALL: DELAY                                        : Call delay subroutine
        MVI A, 24H
        OUT (80H) PA                    : Send data on port A to glow G1 and G2
        MVI A, 09H
        OUT (81H) PB                    : Send data on port B to glow R3 and R4
        MVI C, 28H                              : Load multiplier count (40ıο) for
delay
        CALL DELAY                              : Call delay subroutine
        MVI A, 12H
        OUT PA                              : Send data on port A to glow Y1 and Y2
        OUT PB                              : Send data on port B to glow Y3 and Y4
        MVI C, 0AH                              : Load multiplier count (10ıο) for
delay
        CALL DELAY                              : Call delay subroutine
        JMP START

Delay Subroutine:

DELAY: LXI D, Count                    : Load count to give 0.5 sec delay


BACK: DCX D                                        : Decrement counter
        MOV A, D
        ORA E                                        : Check whether count is 0
        JNZ BACK                              : If not zero, repeat
        DCR C                                        : Check if multiplier zero, otherwise
repeat
        JNZ DELAY
        RET                                        : Return to main program

You might also like