Traffic Light Controller: Based On 8051 Micro Controller
Traffic Light Controller: Based On 8051 Micro Controller
Traffic Lights
Delay Lights
G-Y-R
• The pins of the various input output ports of the
microcontroller are connected directly to the given LEDs.
• The 8051 is programmed in a manner that the respective
LEDs glow by setting the required bit using assembly
language and a certain amount of delay is provided
depending on the user.
Key Components and Functionality
Microcontroller (8051):
• Executes the traffic light control logic.
• Uses P1.0, P2.0, and P3.0 as output pins to control Green, Yellow, and Red LEDs,
respectively.
LEDs for Traffic Lights:
• Green LED (P1.0): Simulates the green traffic signal.
• Yellow LED (P2.0): Simulates the yellow traffic signal.
• Red LED (P3.0): Simulates the red traffic signal.
Delay Counters:
• Implemented using MOV and DJNZ instructions.
• Control the duration of each light:
• Green Light: 10 cycles
• Yellow Light: 5 cycles
• Red Light: 15 cycles
Program Logic:
• The traffic light cycle repeats continuously.
• The sequence is:
• Green Light ON: Turn on the Green LED (P1.0) while
others are off.
• Yellow Light ON: Turn on the Yellow LED (P2.0) while
others are off.
• Red Light ON: Turn on the Red LED (P3.0) while others
are off.