Here’s a traffic light controller using avr microcontroller. It can be adopted for a four way road.
The code is written in Codevision C. You can download the C code and the proteus file from the download.
For more Detail: Traffic light controller using avr microcontroller