Traffic Light Simulation

By Josh Bensadon, email: joshbensadon@yahoo.com

You can connect up to 4 LED's on each output if you increase the series resistor to 470, to conform with the 25mA maximum per pin.
2 Leds with 330 draw 20mA.
4 Leds with 470 draw 28mA.
The 2.2K resistor may be omitted if you are careful not to turn the 100K potentiometer to it's minimum setting.
The Red Flashing input, when connected to +5V will cause just the red lights to flash, like they do at night in small towns, or when the traffic light malfunctions or is on battery power.
If while Red Flashing is high (+5V), the Alternating Red Flashing input is also high, the red lights will flash alternately (like the red lights at a railroad crossing).
If the 50/50 or 75/25 duty cycle is low, during normal operations. The traffic lights spend equal time in each direction. If this pin is high, then Light 1 remains green 75% of the time and light 2 only 25% like you might find at intersections where 1 road is the main through way.
If either Synchronize Light is put high, then the green light for that input is held in Green mode. If that light was red, then the traffic lights change immediately. These inputs can be tied to the Green light output of near by traffic lights to synchronize all the lights down a common strip.
The timing isn't perfect, but it's good for now. Please let me know if any timing should be changed. You may also do it yourself by modifying the .asm source code provided. I would still appreciate notification so I may pass on the realism to others in the group.
The Potentiometer can control the overall timing, but it only scales everything up or down. Nothing short of modifying the program can change the aspect of green to amber, amber to red, red to green timing.
Enjoy,
Josh Bensadon, email joshbensadon@yahoo.com
Josh's files for this can be download here: tlights.zip