Atmega128 is being used to monitor humidity inside test cham

Assignment Help Basic Computer Science
Reference no: EM13163628

A Atmega128 is being used to monitor humidity inside test chamber 03. The device uses two sensors to have some fault tolerance. They are connected to ADC channels 0 and 1. The program uses the average and maximum error of the two values. Previously the program used interrupts to update the average and the maximum error of the two sensors, but recently the interrupts on the chip stopped working. GLaDOS has asked you to write code to do this with polling instead of interrupts.

 

Other notes:

 

MaxError can only be set to a higher value

The ADC has been initialized like the question above

Using a spin lock to wait for ADSC to clear is ok.

 

Void updateHumidity(unsigned* maxError, unsigned* ave){

//your code

}

main(){

unsigned MaxError = 0;

unsigned Ave = 0;

init();

while(1){

updateHumidity(&MaxError, &Ave);

 

// Somebody else's problem

}

}

 

 

Reference no: EM13163628

Questions Cloud

Create an array of integers at random : create an array of integers at random with a range of 0 through 1000 in Java... any hints?
Trigger named products_update : Create a trigger named Products_UPDATE. This trigger should insert the old data about the product into the ProductsAudit table after the row is updated. Then, test this trigger with an appropriate UPDATE statement.
This code uses separate chaining : This code uses separate chaining ...implement it using double hashing. Implement a separate-chaining table in which each integer x is hashed twice using two different hash functions h1(x) and h2(x). This will perhaps produce two different location..
Recall that a computer virus is malware : Recall that a computer virus is malware that relies on someone or something (other than itself) to propagate from one system to another. Write a computer virus that can be written to other empty text documents by running the batch program.
Atmega128 is being used to monitor humidity inside test cham : Atmega128 is being used to monitor humidity inside test chamber 03. The device uses two sensors to have some fault tolerance. They are connected to ADC channels 0 and 1. The program uses the average and maximum error of the two values.
The time delay of a long-distance : The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee
Write a function to compute the magnitude f : write a function to compute the magnitude F and direction angle of a two-dimensional force F by using two components of the force fx,fy as its parameters,returning F and using the reference to pass theta value .
Program that will implement a binary search : Write a program that will implement a binary search. You program should store 40 numbers. The 40 numbers will be initialed in an array (See Below). Your program should read in each number, call a binary search, and Indicate if the number is found ..
Write a function to convert the two dimensional coordinates : write a function to convert the two dimensional coordinates of a point from cartesian system to polar system by using x and y as its parameters

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Merging transaction and analytical processing problem occurs

When merging transaction and analytical processing a problem occurs. Real-time analytical processing diminishes the performance of transaction processing. What is the solution to this problem that many companies use?

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Explain reinforcement of changing program standards

Use operant conditioning, with the program of shaping, to get sloppy roommate to make bed neatly. Incorporate and label antecedent stimulus.

  What is information hiding

What are some of the benefits of modularity? 2. What is functional abstraction? 3. What is information hiding?

  Kinds of attitudes for upper management personnel

Explain in scholarly detail why it is recommended that business communications be oriented toward upper management and what kinds of attitudes should these upper management personnel possess.

  Creating a hashing function

Suppose you are creating a hashing function to use for storing string data in hashtable. One Candidate hasing function would be to sum the ASCII or Unicode values for each character, and that result as the hashcode.

  What your research aims to do

You need to describe what your research aims to do, the objectives that need to be meet to get to the final aim, the context and technical background of the work and also why it is important that this work is carried out.

  What influence the concept of pervasive computing

What you believe the eventually influence will be of concept of "pervasive computing" or"location based services" will be on society.

  Signed-magnitude representations binary numbers in computers

Why do we require signed-and-magnitude representations of binary numbers in computers? Represent decimal values: -37, -54, and 56 in binary by using signed-and magnitude representation.

  Explain the management of high-assurance software

The company does not adduce any additional evidence of assurance. How would you explain to the management of this company why their software is in fact not "high-assurance" software?

  Explain format for storing-laying out objects on page

Describe the format for storing, laying out, and managing the objects on a page. Explain the advantages to the use of this format over other formats, such as that used by HTML.

  Financial impact of change on wvu students

Currently, PRT riders who are not WVU students or employees must pay $0.50 per trip. Assume that this charge was eliminated.

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