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

  Getters would provide access to the attributes.

For this task you will make a Subject class, whose instances will represent the subjects for study at a university. A subject will have a name, just a String, and a subject code, that is a six-character String.

  Determining the total balances forward and total withdrawals

A heading is to emerge at the top of each page and allowance is to be made for the 45 detail lines per page. At the end of the report, print total balances forward, total withdrawals, total deposits, total interest earned and total final account b..

  What specific principles of professional ethics would guide

If you were a key member of the development team that created that game, what specific principles of professional ethics would guide decision making for you as a graphic artist, an interface designer, or a project manager?

  Using a lock guarantees that deadlock cannot occur

Once a Lock has been obtained by a thread, the Lock object will not allow another thread to obtain lock until the first thread releases it.

  Describe how concepts such as risc evolved over past years

Describe how concepts such as RISC, pipelining, cache memory, and virtual memory have evolved over the past 25 years to improve system performance.

  Security policy for mcbride financial services develop a

security policy for mcbride financial services develop a policy based on perceived needs associated within the loan

  Develop a table that relates number of people

Develop a table that relates number of people to project duration for a software project requiring 50,000 LOC and 15 person-years of effort (the productivity parameter is 5000 and B 0.37).

  How many page frames does physical memory have

A process of a system has a virtual memory space of 4096 words or addresses with a page size of 64 words. There are 16 blocks in the main memory with 16 words per block. How many page frames does physical memory have?

  Infa 630 intrusion detection and intrusion prevention

Compare and contrast signature-based and anomaly-based network intrusion detection systems. In your analysis, describe at least three ways in which the two types of IDS are similar, and at least three ways in which they differ.

  Show the rbt after the bst-style deletion

Show the RBT after the BST-style deletion but before RB-Delete-Fixup - Identify whether there is a double black identifying the node, corresponding to underflow

  Questionthis is compulsory to write a report on

questionthis is compulsory to write a report on object-oriented systems. the report must focus on the following systems

  Explain the use of pipelining in computer architecture

Using your learning materials and your own research, you will outline the principles of pipelining and explain the use of pipelining in computer architecture.

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