Question: It is desired to implement a traffic light controller using the PIC18F4321 as follows: Step 1: Make North-South light Green and East-West light Red for

 It is desired to implement a traffic light controller using the

It is desired to implement a traffic light controller using the PIC18F4321 as follows: Step 1: Make North-South light Green and East-West light Red for 10 seconds. Check to see if any waiting car is trying to go from east to west and vice versa. If there is a waiting car, go to step 2; otherwise, repeat this step. Step 2: Make North-South light Yellow and East-West light Red for 2 seconds, and go to Step 3 Step 3: Make North-South light Red and East-West light Green for 5 seconds, and then go to Step 4 Step 4: Make North-South light Red, and East-West light Yellow for 2 seconds, and then go to Step 1 Also, include provision for an emergency input. When this input asserted, a flashing RED light in both directions will be activated. Write a C program for the above state machine using Timer0 in 16-bit mode. Draw an ASM chart showing all inputs and outputs. It is desired to implement a traffic light controller using the PIC18F4321 as follows: Step 1: Make North-South light Green and East-West light Red for 10 seconds. Check to see if any waiting car is trying to go from east to west and vice versa. If there is a waiting car, go to step 2; otherwise, repeat this step. Step 2: Make North-South light Yellow and East-West light Red for 2 seconds, and go to Step 3 Step 3: Make North-South light Red and East-West light Green for 5 seconds, and then go to Step 4 Step 4: Make North-South light Red, and East-West light Yellow for 2 seconds, and then go to Step 1 Also, include provision for an emergency input. When this input asserted, a flashing RED light in both directions will be activated. Write a C program for the above state machine using Timer0 in 16-bit mode. Draw an ASM chart showing all inputs and outputs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!