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

  Output maximisation and cost minimisation

Output maximisation and cost minimisation

  Find total revenue

Find Total Revenue or profit

  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?

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Current economic theory

Current economic theory and their application or lack of application to contemporary economic problems

  Evaluate the mu in the utility functions

Evaluate the MU in the utility functions

  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..

  Question on macroeconomics

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

  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.

  Perform a white test for heteroskedasticity

Perform a White test for heteroskedasticity using auxiliary regression

  Firms operating under cournot competition or cournot market

The details about three identical firms operating in Cournot competition are given. The demand curve with marginal revenue, profit maximization, optimum quantity, total demand and market price related questions are answered.

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