TRAFFIC LIGHT CONTROLLER
BASED ON 8051 MICRO CONTROLLER
• This project uses a LED light as an indicator.
• A Microcontroller for auto change signal after a specific
time interval.
• The LEDs are automatically on and off by making the
corresponding port pin of the MicroController High.
• 8051 MICROCONTROLLER
• RESISTORS (10 kilo ohms)
• CRYSTAL OSCILLATORS (11.0592MHz)
• LED LIGHTS (RED,GREEN,YELLOW)
• BREADBOARD
• POWER SUPPLY
Microcontroller Input/Output Ports
8051 P1.0, P2.0, P3.0
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.