Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
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
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
******************************************************************************/