Write an assembly language subroutine

Assignment Help Microeconomics
Reference no: EM131590

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: EM131590

Questions Cloud

Project specification and plan : The Project Specification is a description of what you are working to achieve, and a Plan is the schedule proposed to achieve it
Capital improvement phase of the project : The governing body of the Order decided that it was no longer feasible to operate the convent, which had been built about sixty years ago, so it was advertised locally for sale.
Mathematical formulation of the model : Mathematical formulation of the model
Optimal translocation strategies : Optimal Translocation Strategies - use stochastic dynamic programming (SDP) to ?nd the optimal decisions
Write an assembly language subroutine : Write an assembly language subroutine
Price elasticity of demand : Price elasticity of demand for two customer segments
Accuracy and completeness of computations : Analysis right and you have to develop a plausible argument to "prove" that your analysis is correct
Java program simulate a network : Java program simulate a network
Computer programming using c language lab : Computer programming using c language lab

Reviews

Write a Review

Microeconomics Questions & Answers

  Calculate the net present value and benefit-cost ratio

Calculate the net present value and benefit-cost ratio for four different discount rates

  How much money require in order maximize the utility

How much total utility does the consumer receive

  Linear demand function

Demand estimation and forecasting and income elasticity of demand

  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?

  Question on macroeconomics

Draw a correctly labeled loanable funds graph that shows what happens to real interest rates.

  Neolithic revolution

Neolithic Revolution

  Evaluate price elasticity of demand

Evaluate price elasticity of demand

  Effect of the ua increasing sovereign wealth funds on gdp

What is the effect of the United Arab Emirates' increasing sovereign wealth funds on GDP?

  Evolution of the price of gold and silver

This document shows the uses supply and demand model to explain the evolution of the price of gold and silver.

  Simple keynesian model

Using an aggregate supply diagram and aggregate demand or model of the economy, graphically explain and discuss the short-run and long-run effects.

  Practical problems in price theory

The problem in economics in price theory deals with deriving maximum marginal utility and marginal rate of substitution and price elasticity of demand.

  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.

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