0% found this document useful (0 votes)
98 views6 pages

Traffic Lights Controller

The document describes a simple traffic light controller using a state machine. The controller has 4 states that cycle through to control 4 lights at an intersection. Each light is green for 20 seconds, then yellow for 5 seconds, while the others remain red, before moving to the next light. A state diagram and state table illustrate how the controller transitions between the 4 states based on a timer value from 0 to 100, then resets to 0 to repeat the cycle.

Uploaded by

G TEJAS WINI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views6 pages

Traffic Lights Controller

The document describes a simple traffic light controller using a state machine. The controller has 4 states that cycle through to control 4 lights at an intersection. Each light is green for 20 seconds, then yellow for 5 seconds, while the others remain red, before moving to the next light. A state diagram and state table illustrate how the controller transitions between the 4 states based on a timer value from 0 to 100, then resets to 0 to repeat the cycle.

Uploaded by

G TEJAS WINI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Traffic Lights Controller

By -

Abhishek Jaisingh ( 14114002 )

A simple traffic light controller can be implemented by a state machine that has a state
diagram such as the one shown in Figure. Its state progresses according the value of the timer
used . When the value of timer reaches a specific value, the state of the system changes .

A set of 4 traffic lights have been designed for a 4 – way junction as shown.

The states are defined in terms of the output . Timer goes from 0 to 100 and then it is reset to
0. Each light is programmed to run as follows:

1. It is GREEN for 20 s.
2. Then it remains YELLOW for 5s.

During this time all other lights remain RED.

This process is continued for all the lights successively.


Finite State Machine
( Moore Machine )

S0
S7 S1

S6 S2

S5 S3
S4

State Diagram
State Table
Time Current Next Output
(input) State State

The color in output represents output light.


time = 0 after time becomes 100.
Code
Input / Output
Waveforms

You might also like