Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can anyone help me with this please. *** Design a finite state machine for a tra

ID: 3864209 • Letter: C

Question

can anyone help me with this please.

*** Design a finite state machine for a traffic light at the intersection of north-south traffic and eastwest traffic. The light can be red, green or yellow. Assume a 30 second clock. Assume that the light will change only if a car is coming in the other direction. If cars are in both north-south and eastwest, the light will change from one direction to the other.

1. What are the machine states?

2. What are the inputs?

3. What are the outputs?

4. Draw state table

5. Draw state diagram

6. Develop the circuit for the NEXT STATE using combinational logic (can use a MUX).

Please help me.

Explanation / Answer

Answer )

1) The machines states are:

north south green

north south yellow

north south red

east west green

east west yellow

east west red.

2) The inputs are :

Reset: which will reset the traffic lights to the initial condition

Cardetector: which will detect the car on road and thus informing to make changes in the state of lights accordingly.

The NScar = 1 when there is a car in north south direction, EWcar =1 when there is a car in eadt-west direction

(Note: A direction can have green light only if the light in the other direction is red.)

3) The machine outputs are the same as that of the states i.e.

north south green

east west green

4) State table:

where EWgreen= east west green light

NSgreen= north south green light

CURRENT STATE INPUTS NEXT STATE NScar EWcar NSgreen 0 0 NSgreen NSgreen 0 1 EWgreen NSgreen 1 0 NSgreen NSgreen 1 1 EWgreen EWgreen 0 0 EWgreen EWgreen 0 1 EWgreen EWgreen 1 0 NSgreen EWgreen 1 1 NSgreen
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote