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

Traffic Light Controller: Based On 8051 Micro Controller

This document describes a traffic light controller project using an 8051 microcontroller. The project uses LED lights to indicate traffic signals and the microcontroller to automatically change the signals after a set time interval. The microcontroller ports are connected to red, yellow, and green LEDs. The microcontroller is programmed to turn on the LEDs sequentially, representing the traffic light signals, with a 1000ms delay between changes.

Uploaded by

FARHAAN. A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

Traffic Light Controller: Based On 8051 Micro Controller

This document describes a traffic light controller project using an 8051 microcontroller. The project uses LED lights to indicate traffic signals and the microcontroller to automatically change the signals after a set time interval. The microcontroller ports are connected to red, yellow, and green LEDs. The microcontroller is programmed to turn on the LEDs sequentially, representing the traffic light signals, with a 1000ms delay between changes.

Uploaded by

FARHAAN. A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

TRAFFIC LIGHT CONTROLLER

BASED ON 8051 MICRO CONTROLLER

SAYYAD FARHAAN ALI (45)


SUMMIT SABLE (42)
ROHAN PANDEY (33)
ROHAN JAITPAL (56)
INTRODUCTION
• 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.
COMPONENTS REQUIRED
• 8051 MICROCONTROLLER
• RESISTORS (10 kilo ohms)
• CRYSTAL OSCILLATORS (11.0592MHz)
• LED LIGHTS (RED,GREEN,YELLOW)
• BREADBOARD
• POWER SUPPLY
BLOCK DIAGRAM
CIRCUIT DIAGRAM
WORKING
• 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.
PROGRAM
// Traffic light project prototype with AVR microcontroller
#define F_CPU 8000000UL
#include<avr/io.h>
#include<util/delay.h>

int main()
{
unsigned int ch[]={0x90,0x80,0xF8,0x82,0x92,0x99,0xB0,0xA4,0xF9,0xC0};
unsigned int i;
DDRC=0xFF;
DDRA=0xFF;
DDRB=0xFF;
DDRD=0xFF;
PORTA=(1<<5);
PORTB=(0<<5);
PORTD=(0<<5);

while(1)
{
for(i=0;i<10;i++)
{
PORTC=ch[i];
_delay_ms(1000);
}
PORTA=(0<<5);
PORTB=(0<<5);
PORTD=(1<<5);
for(i=6;i<10;i++)
{
PORTC=ch[i];
_delay_ms(1000);
}
PORTA=(0<<5);
PORTB=(1<<5);
PORTD=(0<<5);
for(i=0;i<10;i++)
{
PORTC=ch[i];
_delay_ms(1000);
}

PORTA=(0<<5);
PORTB=(0<<5);
PORTD=(1<<5);
for(i=6;i<10;i++)
{
PORTC=ch[i];
_delay_ms(1000);
}
PORTA=(1<<5);
PORTB=(0<<5);
PORTD=(0<<5);
}
}
THANK YOU.......

You might also like