hi Ian, thank you very much.. am writing program for pedstrain traffic light simualtor using PIC 12f675...
. In the default state of the system, cars have open pass, whereas pedestrians have to wait. That is, make sure that the car red and amber lights are off, whereas the green light is on, and at the same time, the pedestrian red light is on and green light is off. Also, the pedestrian indicator light is off.
Upon a click on the pedestrian’s button (simulated by the button on the PIC kit breadboard), the first transition phase starts. First, the pedestrian indicator light goes on for 10 seconds and during that time any new button click would not be accepted (the five seconds are measured only from the first button click). Then, the car green light goes off and amber light on for 2s. Finally, simultaneously, the car amber light turns off, red turns on, the pedestrian red turns off, green on and indicator off.
The new state lasts for a time interval determined by the adjustable resistor on the PIC breadboard. For the minimal value, the duration should be equal to 5s, whereas for the maximal value, it should be 30s.
After expiration of the determined time interval, the second transition phase starts. First, the pedestrian green turns off, red on and this state takes 3s (safety margin time for pedestrians to move away from the road). Then, the car amber turns on simultaneously with the red light (which remains on). Finally, the car red and amber lights turn off and green turns on. The system is back to the default state and should remain in it until the next button click.
the leds are not lighting up in hardware...
just thinking did i miss or done any mistake to intialise bits
thank you
You really are struggling.... every post comes to the same issue.
Tell me!! What is your goal... What do you want the code to achieve and I'll help you get there..
All the code you have uploaded is in need of a good o'l sort out...