Write a c program for the given state machine using timer

Assignment Help Computer Engineering
Reference no: EM131475897

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 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 is 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.

Reference no: EM131475897

Questions Cloud

Find what is return on equity earned by the company : Analyze the quality of the Samsung's existing products or services. What is return on equity earned by company? What is return on capital earned by company?
Choice of three investments : An individual saving for retirement has a choice of three investments. Option A would have a 20% chance of producing $1 million
Essay - analysis of personal and organizational styles : Individual Essay - Analysis of personal and organizational styles and assessment of strategies for creative thinking and innovation. Each participant is required to submit an essay based on an exploration of the nature of creativity and innovation
University offering both undergraduate and graduate degrees : Paradise State University (PSU) is a medium-sized private university offering both undergraduate and graduate degrees.
Write a c program for the given state machine using timer : 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.
What integration is required with multiple departments : What integration is required with multiple departments/divisions in order for the company to achieve its mission and vision?
Draw the diagram for this claw-back provision : On December 8, 2000, General Mills announced to acquire the worldwide business of Pillsbury from Diageo PLC. Draw the diagram for this claw-back provision.
Define the term interface : List the four main components of a programmable logic controller.
Identify its business objectives and strategy : Identify its operations strategy by analyzing its actions in the key decision areas of structure and infrastructure.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a method that takes a float w and draw a pair of lines

Write a method that takes a float, w, and draws a pair of lines that cross at the location of the cursor. w is the total horizontal width of the X-shape that they make.

  What is the most significant advantage of the implementation

What is the most significant advantage of the implementation? What is the most significant disadvantage of the implementation? Provide a scenario where this method of threading will provide the best solution and explain why.

  Suppose you have a relation schema about teaching classes

suppose you have a relation schema about teaching classes that has the following attributes class instructor time and

  Create a directory structure for a new accountant

Create a summary document  describing how the knowledge, skills and attitudes learned in this will  apply to your chosen career - Create a directory structure for a new accountant that is organized to  house the following items

  Why text in txtboxin is moved to txtboxout

You have a form with two text boxes, txtBoxIn and txtBoxOut, and a command button, cmdButton1. Write down the instructions such that when the button is selected, the text in txtBoxIn is moved to txtBoxOut.

  Explain about virtualisation technology

Describe your reasoning for choosing the virtualisation technology and what advantages this technology gives you in this scenario - what are the disadvantages/limitations of this technology?

  Explain what the database roles

Describe steps necessary to setup SQL Server security.

  What are the triggering levels

What are the triggering levels (rising or falling edge) of INT0 - INT2 upon power-on reset? Write a PIC18F assembly language program to activate the triggering.

  Write down an event handler that automatically assigns

design an ASP.NET project with Visual Studio.NET 2005. Add an aspx form to the application. Place a ListBox control, a TextBox control, a Label control, and a Button control on the form. Add at least three items to the ListBox control.

  Consider a dash system

Consider a DASH system for which there are N video version (at N different rates and qualities) and N audio versions (at N different rates and versions).

  1 in platosrepublic glaucon presents a three-part argument

1. in platosrepublic glaucon presents a three-part argument meant to show that justice is not natural but rather

  What is the future of the software

The current practice of a mainly part of water resources engineering is supported by various of commercial software. Pick a specific domain within water resources engineering. What is the software.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd