To implement the program you must write several subroutines

Assignment Help Microeconomics
Reference no: EM13347657

To implement the program you must write several subroutines and a main program to operate an Engine Control Unit which uses the Analog To Digital converter (ATD), Input/Output ports and the Timer built into the HC12. The input of ATD channel 2 is connected to a tachometer measuring the engine speed. An active low timing trigger input and the fuel inj ector pulse output are connected to Port H as shown in Figure 1.

344_operate an Engine Control Unit.png

You are required to take 4 engine speed measurements, take their average value, make a simple calculation and create the timing interval for the fuel injector pulse width (W).

There are several parts/subroutines required to be written for this problem and you may create other subroutines to complete your coding and improve the structure of your program.

Instructions on how to implement the program using the MiniIDE editor/assembler and SimH Simulator software are provided aftert this specification. Suggestions on using the simulator to test your p rogram arep rovided (in italics) in severalpar ts of the assignment.

Part-1

Write an assembly language subroutine called INITATD to initialise the ATD ready to operate as required in Part 2 below.

Part-2

Write an assembly language subroutine called SPEED that starts an 8 bit, left justified ATD conversion on channel 2, waits for the conversion to complete, reads the resulting data and returns the data in accumulator A. The data value returned will be a positive number, $00 through to $50 (decimal=80). This number is a measure of Engine Speed (S) in hundreds of revs per minute. For example an ATD value of $20 (decimal=32) equates to 3200 rpm. Although larger numbers can come from the ATD, the maximum range of values you can expect is 0 to 80.

When testing this on the simulator you should switch on the ADC viewer under the View menu. You should set the analog input using the sliderf or channel 2 (PAD2). A value of 0.0 volts set on the slider equates to 0 rpm and 1.5682 volts set on the slider equates to an engine sp eed of 8000 rpm . Each click on a slider arrow is 100 rpm up or down on the engine speed.

Reference no: EM13347657

Questions Cloud

Industrial designindustrial design differs from : industrial designindustrial design differs from conventional design engineering in terms of largely aesthetic and
Background informationeileen timmons was a registered nurse : background informationeileen timmons was a registered nurse living in salmon river newfoundland. a single parent with
We want to divide n students into m groups of the same size : we want to divide n students into m groups of the same size where each student is a member of exactly one group. the
You will need to model each population in terms of a nite : you will need to model each population in terms of a ?nite number of individuals which can increase or decrease each
To implement the program you must write several subroutines : to implement the program you must write several subroutines and a main program to operate an engine control unit which
Question 1skyymarley airlines has determined that the price : question 1skyymarley airlines has determined that the price elasticity of demand for two customer segments coach and
Assessmentthe project reports will be evaluated in three : assessmentthe project reports will be evaluated in three areasaccuracy and completeness of computationsyou have to get
We will simulate a very simple network by having a process : we will simulate a very simple network by having a process correspond to a node in the network and files correspond to
1 prepare a program to read 3 numbers x y z use conditional : 1. prepare a program to read 3 numbers x y z. use conditional statement and evaluate values of variables a b and c.

Reviews

Write a Review

Microeconomics Questions & Answers

  The free rider problem

Question: Explain why the free rider problem makes it difficult for perfectly competitive markets to provide the Pareto efficient level of a public good.

  Failure of the super committee is good thing for economy

Some commentators have argued that the failure of the “Super committee” is good thing for the economy?  Do you agree?

  Case study analysis about optimum resource allocation

Case study analysis about optimum resource allocation: -  Why might you suspect (even without evidence) that the economy might not be able to produce all the schools and clinics the Ministers want? What constraints are there on an economy's productio..

  Fixed cost and vairiable cost

Questions:  :   Which of the following are likely to be fixed costs and which variable costs for a chocolate factory over the course of a month?  Explain your choice.

  Problem - total cost, average cost, marginal cost

Problem - Total Cost, Average Cost, Marginal Cost: -  Complete the following table of costs for a firm.  (Note: enter the figures in the  MC   column  between  outputs of  0 and 1, 1 and 2, 2 and 3, etc.)

  Oligopoly and demand curve problem

Problem based on Oligopoly and demand curve,  Draw and explain the demand curve facing each firm, and given this demand curve, does this mean that firms in the jeans industry do or do not compete against one another?

  Impact of external costs on resource allocation

Explain the impact of external costs and external benefits on resource allocation;  Why are public goods not produced in sufficient quantities by private markets?  Which of the following are examples of public goods (or services)? Delete the incorrec..

  Shifts in demand and movements along the demand curve

Describe the differences between shifts in demand and movements along the demand curve. What are the main factors which can shift the demand curve? Explain why they cause the demand curve to shift. Use examples and draw graphs to support your discuss..

  Article review question

Article Review Question: Read the following excerpts from the article "Fruit, veg costs surge' by Todd, Dagwell, published in the Herald on January 25th 2011 and answer questions below:

  Long-term growth, international trade & globalization

Long-term Growth, International Trade & Globalization:- This question deals with concepts such as long-term growth, international trade and globalization. Questions related to trade deficit, trade surplus, gains from trade, an international trade sce..

  European monetary union (emu) in crisis

"Does the economic bailout of Spain and Greece spell the beginning of the end for the European Monetary Union (EMU)?"

  Development game “settlers of catan”

Read the rules of the game, the overview and the almanac for the Development Game "Settlers of Catan"

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