9:50 AM
Design a 8085 Microprocessor based Traffic light control with program code

Aim: Design a 8085 Microprocessor based Traffic light control for figure shown below with the following conditions:
 Allow traffic to flow from N to S & S to N for 1sec
 Glow all Yellow lights for 0.2sec
 Allow traffic to flow from W to E & E to W for 1sec
 Glow all Yellow lights for 0.2sec
 Make this process continues.


Requirements: 8085 Microprocessor Kit, 9 LED’s, 5K resistors (9)
Learning Objectives: Design of traffic light control using 8085 microprocessor


Outline of the Procedure:
1. Connect the circuit as shown in the below diagram
2. Turn on the kit.
3. Write the given code.
4. Execute the code and verify the results on leds.
Circuit Diagram:

 


Program:
MVI A, 80H : Initialize 8255, port A and port B
OUT CR ;(CR) : in output mode
START: MVI A, 09H
OUT PA; (PA) : Send data on PA to glow R1 and R2
MVI A, 24H
OUT PB; (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 PA; 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 80H : Send data on port A to glow Y1 and Y2
OUT 81H : 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


Learning outcomes: to be written by the students in 50-70 words

Views: 109 | Added by: vijoriya | Tags: Traffic light control, 8085 Microprocessor, Program code, design | Rating: 0.0/0
Total comments: 0
avatar