Professional Documents
Culture Documents
Summer 2 Task 2 Embedded
Summer 2 Task 2 Embedded
Task 2
TRAFFIC LIGHTS Project using PIC16f877A:-
- A microcontroller was used int the circuit to implement the program of shifting the lights.
- The IC chip PIC16f877A was used and "mikroC pro" was used to implement that program.
There are two roads intersecting each other. Each one has a traffic light, the two streets cannot
allow the cars to pass at the same time. So, the lights on the southern street should go with the
following order (23 sec 'red', 12 sec 'green', 3 sec 'yellow'), and the lights on the western street should
go with the following order (15 sec 'red', 20 sec 'green', 3 sec 'yellow'). So, the best way to apply the
best timing is to align the southern red with green and yellow of the western street, and align the red of
the western street with the green and yellow of the southern.
There is a manual mode and an automatic one, with a switch to shift between both, and there’s
another switch to shift between streets in manual mode.
* PIC16F877A.
* Six resistors were used, four of value 4.7K, two of value 10K.
* Two switches.
* Two traffic lights (six leds: two green, two yellow and two red)