PIC16F84_Traffic Light
This project includes PIC16F84 Microcontroller ,six current limiting resistors and and
LED s. To simulate circuit in this project, initially activate Mixed Mode simulator from the Schematic Editor window. Selecting Run Transient analysis from Simulation menu can perform simulation.
In this project PORTB is set as output port. The different colour Light-emitting diode is connected to the PORTB through a resistor. Upper three bits, as first group of LEDs and lower three bits as second group of LEDs.The micro control set its port as HIGH or LOW State according to program. For HIGH state LED will on and for LOW it will off.
The source code written in assembly language and can be viewed from the
code editor window.
Algorithm
Step1: Start
Step2: Red LED from 1st group and Green LED from the 2nd group will light.
Step3: Red & Amber LEDs from 1st group & Amber LED from the 2nd group will light for few seconds.
Step4: Green LED from the 1st group and Red LED from the 2nd group will light.
Step5: Amber LED from the 1st group and Red & Amber LED from the 2nd group for few seconds
Step6: Goto Step2.
The source code in the
code editor window
has to be
compiled
after making any modifications
(editing).
Also the code can be
debugged
during
simulation.