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

  Describe in detail how you would apply the techniques

Suppose that you are the analyst charged with developing a new system. What requirements gathering techniques will you use? Describe in detail how you would apply the techniques.

  Modify the app so that it displays welcome to app inventor

Modify the app so that it displays "Welcome To App Inventor, Username!" (with Username replaced by the name the user enters). Ensure that the message is displayed correctly when no name is entered.

  Write down a program to assign the integer values 1 through

write a program to assign the integer values 1 through 25 to a 25 element integer array. then print the array as five

  Identify one web site that violates the use of colors

Identify one web site or application that violates the use of colors as described in Step 12 of the textbook. Take a screen shot of its screen and paste it in a Word document.

  Create an excel spreadsheet that george can use

Create an Excel spreadsheet that George can use as a decision support tool to answer his questions. The spreadsheet should be designed such that George would be able to use the spreadsheet without any additional documentation

  Developing the java servlet

Provide the Java servlet which utilizes the doGet in order to return the markup document which offers your name.

  Discuss the importance of security and computer use policies

Identify and discuss the steps necessary to make electronic evidence admissible in court. Identify various crimes and incidents that are involved in electronic forensic investigations. Discuss the importance of security and computer use policies.

  Define the edge connectivity of a tree is 1

The edge connectivity of an undirected graph is the minimum number k of edges that must be removed to disconnect the graph. For instance, the edge connectivity of a tree is 1, and the edge connectivity of a cyclic chain of vertices is 2.

  Use the library and other quality resources for information

use the library and other quality resources for information about the role of computer forensics and security within

  Find ability to emphasize the points on a list

PowerPoint gives users the ability to emphasize the points on a list with either numbers or bullets. Study the following statements, give a specific example where each would be more appropriate and justify your answers.

  Implementation and explain the measured behavior

Analyze your threaded implementation by comparing its performance to the original non-threaded implementation and explain the measured behavior.

  Suppose that you are working for the business systems

assume that you are working for the business systems analysis department in ibms prc division which offers both

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