Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Microeconomics Expert

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.

Microeconomics, Economics

  • Category:- Microeconomics
  • Reference No.:- M9132021

Have any Question?


Related Questions in Microeconomics

Assignment consider a team that you have been a member of

Assignment: Consider a team that you have been a member of. This can be a work team, sports team, school team etc. Explain the purpose of the team, the group task functions, the individual task functions, and if the team ...

Question emily likes pretzels and pepsi she bought 10

Question: Emily likes pretzels and pepsi. She bought 10 bottles of Pepsi for $2 each. Her marginal utility for the tenth bottle was 12 utils. She also bought 7 bags of pretzels for $4 per bag. Her marginal utility for th ...

Question what are the major differences in translating

Question: What are the major differences in translating liabilities between the current rate method and the temporal method? The response must be typed, single spaced, must be in times new roman font (size 12) and must f ...

Question suppose a city passes a law requiring that all

Question: Suppose a city passes a law requiring that all coffee sold in the city be brewed using Fair Trade, Shade Grown, No Pesticide coffee beans. These coffee beans can cost more than twice as much as conventional ble ...

Question discuss in scholarly detail how a firm can balance

Question: Discuss in scholarly detail how a firm can balance the demands for control/differentiation in the corporate level of management with the need for coordination/integration. The response must be typed, single spa ...

Question suppose a market with the following production

Question: Suppose a market with the following production function F(K, L) = (K - 1) 1 4L 1 4 . Consider the wage w = 1 and the capital return r = 4. Suppose in the short run K = 2. a) What is the demand for labor in the ...

Question in his 1964 presidential campaign barry goldwater

Question: In his 1964 presidential campaign, Barry Goldwater argued that a reduction in both government spending and taxes would boost economic growth. His views were disparaged by most economists and he was overwhelming ...

Question we can think of return on an investment as a good

Question: We can think of return on an investment as a "good" and risk as a "bad." Now assume that A and B are both goods, that is, more of A is preferable to less of it, and likewise for B. What do indifference curves b ...

Question calculate the equity each of these people has in

Question: Calculate the equity each of these people has in his or her home: a. Fred just bought a house for $200,000 by putting 10% as a down payment and borrowing the rest from the bank. b. Freda bought a house for $150 ...

Question the national park service charges visitors to a

Question: The National Park Service charges visitors to a certain monument a $5 per car admission fee and an additional fee of $5 per camera. Is this necessarily price discrimination or might it be based on costs? If it ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As