Professional Documents
Culture Documents
AV-314 - Lab 06 - 282308 - 282278
AV-314 - Lab 06 - 282308 - 282278
SUBMITTED TO:
LAB ENGR MUHAMAD ALI KHALID
SUBMITTED BY:
NAME: PAK NO: CMSID:282308
NAME: PAK NO: CMSID:282278
Implementation of PIC Traffic Light
Simulator
Introduction:
In this lab we have implemented a traffic light simulator using PIC 16F877A microcontroller. The
following steps were followed in the execution of this lab. Four signal were modelled in the software as
well as hardware. At one time, only one signal gave a green signal while the other three gave a red
signal. All signals gave a green signal sequentially.
Coding:
The program was written in C language using the software mikroC PRO. The following code was written:
Circuit Model:
The circuit was modelled in proteus software and the hex file, which was created in microC PRO, was
imported into this model. Then the circuit was simulated.
Code Burning:
After successful simulation, the hex file, created previously, was burned into the microcontroller PIC
16F877A. This was done using the pickit2 software.
Hardware Implementation:
Then the physical circuit, containing the microcontroller with the hex file, was patched on a breadboard.
The circuit was run successfully.
Conclusion:
A traffic light simulator was successfully modelled on software as well as hardware using a PIC16F877A.
This enabled us to implement slightly more complex logic using PIC16F877A.