SlideShare a Scribd company logo
TRAFFIC SIGNAL CONTROLLER USING
AT89C52 MICROCONTROLLER
Microcontroller and its Applications
Guide Faculty : Prof Jalpa Shah
Vivek Patel ( 11BCE073 ), Yamini Rathod ( 11BCE078 )
11bce073@nirmauni.ac.in 11bce078@nirmauni.ac.in
Institute of Technology,
Nirma University
Project Details
Project Name : Traffic Signal Controller
Required Hardware :
1. AT89C52 Chip
2. 6 LEDs ( 2 Red, 2 Yellow and 2 Green )
3. 6 Resistors ( 1 kΩ each)
4. Wires
Required Software :
1. Keil uVision3 ( to create hex file for the project )
2. Nvis 5001 ( to dump hex file into hardware )
Objective :
 Synchronize the two different traffic signals
 Change the states of signal lights according to
different timings
Circuit Diagram
Hardware Implementation
Figure 1. Bread Board Signal LEDs Connection Diagram
Figure 2. Project Setup Connection Diagram
Project Description
 The project is based on the synchronization of two traffic signal using
AT89C52 Microcontroller.
 Here, there are two traffic control signals. They will change their states of
signal lights according to the different timings.
Figure 3. Nvis 5001 Circuit Connection Diagram with AT89052
 Assuming that there are two controls P1 and P2. P1 and P2 are synchronize
using the same timer. When one side signal port is on it will starts timer. Two
traffic controls are synchronize for every 30 seconds.
 When one control starts its working, it will starts timer and display red light
till timer reaches to 20 seconds. From 20 to 30 seconds it will display yellow
light. At the same time another control will display green light.
 When first control P1 reaches to timer value 30 seconds, it will stop timer. At
the same time second control P2 will starts timer. It will follow the same
procedure. The two controls work in the synchronous manner.
Program Code
/******************************************************************************
* FileName: Main.c
* Processor: AT89C52
* Complier: Keil IDE
* Project Name: Traffic Controller
* Project Guide: Prof Jalpa Shah
******************************************************************************/
#include<regX52.h>
/******************************************************************************
* Pins for LED for Traffic Signal
******************************************************************************/
#define LED1_RED P1_0
#define LED1_YELLOW P1_1
#define LED1_GREEN P1_2
#define LED2_RED P2_0
#define LED2_YELLOW P2_1
#define LED2_GREEN P2_2
#define ON 1
#define OFF 0
/******************************************************************************
* Delay Function for Timing Control
*
* Timer 0 with MODE 0
* Delay generated with Timer : 10 ms
* Timer Count : 0x0DC00
*
* Perameters:
* NUMBER OF SECONDS
*
* Output:
* NONE
******************************************************************************/
void delay(int time)
{
int i=time*100;
TMOD = 0X00;
while(i)
{
TH0 = 0X0DC;
TL0 = 0X000;
TR0 = 1;
while(TF0 == 0);
TR0 = 0;
TF0 = 0;
i--;
}
}
/******************************************************************************
* Main Loop
******************************************************************************/
void main()
{
while(1)
{
LED1_RED = ON; LED2_GREEN = ON;
delay(20);
LED1_RED = OFF;
LED1_YELLOW = ON;
delay(10);
LED1_YELLOW = OFF; LED2_GREEN = OFF;
LED1_GREEN = ON; LED2_RED = ON;
delay(20);
LED2_RED = OFF;
LED2_YELLOW = ON;
delay(10);
LED1_GREEN = OFF; LED2_YELLOW = OFF;
}
}

More Related Content

Viewers also liked

Rangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-acRangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-ac
Andi Risal
 
Rangkaian arus searah
Rangkaian arus searahRangkaian arus searah
Rangkaian arus searah
arismanna
 
Mengambar simbokomponen pcb
Mengambar simbokomponen pcbMengambar simbokomponen pcb
Mengambar simbokomponen pcb
I-one Goenaone
 
01. Pengantar DRL 2015
01. Pengantar DRL 201501. Pengantar DRL 2015
01. Pengantar DRL 2015
Ali Sadiyoko
 
Membuat traffic light dengan avr at mega
Membuat traffic light dengan avr at megaMembuat traffic light dengan avr at mega
Membuat traffic light dengan avr at mega
Priyo Harjiyono
 
Teorema Norton
Teorema NortonTeorema Norton
Teorema Norton
Afif Rakhman
 
Komponen komponen kontrol
Komponen komponen kontrolKomponen komponen kontrol
Komponen komponen kontrol
arie eric
 
Teori thevenin
Teori theveninTeori thevenin
Teori thevenin
AuliaHapsari
 
02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide
Ali Sadiyoko
 
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Anisa Putri Rinjani
 
Pendahuluan plc
Pendahuluan plcPendahuluan plc
Pendahuluan plc
arie eric
 
14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar
fx oktaf laudensius
 
Teorema Thevenin
Teorema TheveninTeorema Thevenin
Teorema Thevenin
Afif Rakhman
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
fauziahnurm
 
rangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisarangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisa
Resty annisa
 
La pobreza
La pobrezaLa pobreza
La pobreza
maricielocorrea
 
05. operational amplifier
05. operational amplifier05. operational amplifier
05. operational amplifier
Ali Sadiyoko
 
04. thevenin norton (2015) ide
04. thevenin norton (2015) ide04. thevenin norton (2015) ide
04. thevenin norton (2015) ide
Ali Sadiyoko
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Muhammad Kennedy Ginting
 
Automatic Door Control using LM35 Sensor
Automatic Door Control using LM35 SensorAutomatic Door Control using LM35 Sensor
Automatic Door Control using LM35 Sensor
Aghnia Rusydah
 

Viewers also liked (20)

Rangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-acRangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-ac
 
Rangkaian arus searah
Rangkaian arus searahRangkaian arus searah
Rangkaian arus searah
 
Mengambar simbokomponen pcb
Mengambar simbokomponen pcbMengambar simbokomponen pcb
Mengambar simbokomponen pcb
 
01. Pengantar DRL 2015
01. Pengantar DRL 201501. Pengantar DRL 2015
01. Pengantar DRL 2015
 
Membuat traffic light dengan avr at mega
Membuat traffic light dengan avr at megaMembuat traffic light dengan avr at mega
Membuat traffic light dengan avr at mega
 
Teorema Norton
Teorema NortonTeorema Norton
Teorema Norton
 
Komponen komponen kontrol
Komponen komponen kontrolKomponen komponen kontrol
Komponen komponen kontrol
 
Teori thevenin
Teori theveninTeori thevenin
Teori thevenin
 
02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide
 
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
 
Pendahuluan plc
Pendahuluan plcPendahuluan plc
Pendahuluan plc
 
14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar
 
Teorema Thevenin
Teorema TheveninTeorema Thevenin
Teorema Thevenin
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
 
rangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisarangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisa
 
La pobreza
La pobrezaLa pobreza
La pobreza
 
05. operational amplifier
05. operational amplifier05. operational amplifier
05. operational amplifier
 
04. thevenin norton (2015) ide
04. thevenin norton (2015) ide04. thevenin norton (2015) ide
04. thevenin norton (2015) ide
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
 
Automatic Door Control using LM35 Sensor
Automatic Door Control using LM35 SensorAutomatic Door Control using LM35 Sensor
Automatic Door Control using LM35 Sensor
 

Similar to Traffic signal controller using at89 c52 microcontroller

Industrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN NetworkIndustrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN Network
IRJET Journal
 
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic ApplicationSmart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
International Journal of Power Electronics and Drive Systems
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machine
eSAT Journals
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORING
IRJET Journal
 
Realtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreRealtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreBhushan Deore
 
Bottle Filling Application using Arduino
Bottle Filling Application using ArduinoBottle Filling Application using Arduino
Bottle Filling Application using Arduino
Parth Patel
 
subission report
subission reportsubission report
subission reportManoj Kumar
 
DIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KITDIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KIT
Amit Prakash Ghimire
 
Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...
Mustefa Jibril
 
IRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller CounterIRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller Counter
IRJET Journal
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLC
vivatechijri
 
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHMHOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
IRJET Journal
 
IRJET- Multilevel Object Sorting System using PLC Controller
IRJET-  	  Multilevel Object Sorting System using PLC ControllerIRJET-  	  Multilevel Object Sorting System using PLC Controller
IRJET- Multilevel Object Sorting System using PLC Controller
IRJET Journal
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_ReportVansh Kumar
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Siang Wei Lee
 
IRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in IndustriesIRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in Industries
IRJET Journal
 
IRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLCIRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLC
IRJET Journal
 
IRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud ComputingIRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud Computing
IRJET Journal
 
Prediction of PID control model on PLC
Prediction of PID control model on PLCPrediction of PID control model on PLC
Prediction of PID control model on PLC
TELKOMNIKA JOURNAL
 
4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre
Bhushan Deore
 

Similar to Traffic signal controller using at89 c52 microcontroller (20)

Industrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN NetworkIndustrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN Network
 
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic ApplicationSmart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machine
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORING
 
Realtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreRealtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultre
 
Bottle Filling Application using Arduino
Bottle Filling Application using ArduinoBottle Filling Application using Arduino
Bottle Filling Application using Arduino
 
subission report
subission reportsubission report
subission report
 
DIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KITDIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KIT
 
Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...
 
IRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller CounterIRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller Counter
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLC
 
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHMHOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
 
IRJET- Multilevel Object Sorting System using PLC Controller
IRJET-  	  Multilevel Object Sorting System using PLC ControllerIRJET-  	  Multilevel Object Sorting System using PLC Controller
IRJET- Multilevel Object Sorting System using PLC Controller
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_Report
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)
 
IRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in IndustriesIRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in Industries
 
IRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLCIRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLC
 
IRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud ComputingIRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud Computing
 
Prediction of PID control model on PLC
Prediction of PID control model on PLCPrediction of PID control model on PLC
Prediction of PID control model on PLC
 
4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Traffic signal controller using at89 c52 microcontroller

  • 1. TRAFFIC SIGNAL CONTROLLER USING AT89C52 MICROCONTROLLER Microcontroller and its Applications Guide Faculty : Prof Jalpa Shah Vivek Patel ( 11BCE073 ), Yamini Rathod ( 11BCE078 ) 11bce073@nirmauni.ac.in 11bce078@nirmauni.ac.in Institute of Technology, Nirma University
  • 2. Project Details Project Name : Traffic Signal Controller Required Hardware : 1. AT89C52 Chip 2. 6 LEDs ( 2 Red, 2 Yellow and 2 Green ) 3. 6 Resistors ( 1 kΩ each) 4. Wires Required Software : 1. Keil uVision3 ( to create hex file for the project ) 2. Nvis 5001 ( to dump hex file into hardware ) Objective :  Synchronize the two different traffic signals  Change the states of signal lights according to different timings
  • 4. Hardware Implementation Figure 1. Bread Board Signal LEDs Connection Diagram Figure 2. Project Setup Connection Diagram
  • 5. Project Description  The project is based on the synchronization of two traffic signal using AT89C52 Microcontroller.  Here, there are two traffic control signals. They will change their states of signal lights according to the different timings. Figure 3. Nvis 5001 Circuit Connection Diagram with AT89052  Assuming that there are two controls P1 and P2. P1 and P2 are synchronize using the same timer. When one side signal port is on it will starts timer. Two traffic controls are synchronize for every 30 seconds.  When one control starts its working, it will starts timer and display red light till timer reaches to 20 seconds. From 20 to 30 seconds it will display yellow light. At the same time another control will display green light.  When first control P1 reaches to timer value 30 seconds, it will stop timer. At the same time second control P2 will starts timer. It will follow the same procedure. The two controls work in the synchronous manner.
  • 6. Program Code /****************************************************************************** * FileName: Main.c * Processor: AT89C52 * Complier: Keil IDE * Project Name: Traffic Controller * Project Guide: Prof Jalpa Shah ******************************************************************************/ #include<regX52.h> /****************************************************************************** * Pins for LED for Traffic Signal ******************************************************************************/ #define LED1_RED P1_0 #define LED1_YELLOW P1_1 #define LED1_GREEN P1_2 #define LED2_RED P2_0 #define LED2_YELLOW P2_1 #define LED2_GREEN P2_2 #define ON 1 #define OFF 0 /****************************************************************************** * Delay Function for Timing Control * * Timer 0 with MODE 0 * Delay generated with Timer : 10 ms * Timer Count : 0x0DC00 * * Perameters: * NUMBER OF SECONDS * * Output: * NONE ******************************************************************************/
  • 7. void delay(int time) { int i=time*100; TMOD = 0X00; while(i) { TH0 = 0X0DC; TL0 = 0X000; TR0 = 1; while(TF0 == 0); TR0 = 0; TF0 = 0; i--; } } /****************************************************************************** * Main Loop ******************************************************************************/ void main() { while(1) { LED1_RED = ON; LED2_GREEN = ON; delay(20); LED1_RED = OFF; LED1_YELLOW = ON; delay(10); LED1_YELLOW = OFF; LED2_GREEN = OFF; LED1_GREEN = ON; LED2_RED = ON; delay(20);
  • 8. LED2_RED = OFF; LED2_YELLOW = ON; delay(10); LED1_GREEN = OFF; LED2_YELLOW = OFF; } }