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

  The strike predicate need not work

Define a predicate strike(X,Y,Z) that succeeds if and only if the list Z would be obtained if one were to remove all occurrences of element X from list Y. The strike predicate need not work well when Y is an unbound variable.

  Variety of tools that use to prepare project

In this course, you looked at a variety of tools that you would use to prepare a project. Some areas you looked at included, but were not limited to?

  Tools to perform project management processes

Describe in scholarly detail the tools and techniques that are used for prforming project management processes.

  Write maximum and minimum rotational latency of disk

Write down the maximum and minimum rotational latency of this disk? Determine the average rotational latency of this disk?

  Write sequence of statements-find first comma in string line

Write down sequence of statements which finds first comma in the string line, and assigns to variable clause portion of line up to, but not including comma.

  Explain computer viruses spread by email or other methods

Explain computer viruses spread via email or by other methods. What negative consequences can they have on an organization's operations?

  Internet, internet, intranet

Define the terms internet, Internet, intranet and extranet, highlighting the similarities and differences between them.

  Calculate a checksum as ones-complement sum

Calculate a checksum as ones-complement sum of following 8-bit words #1 through #4, and then ones-complement that sum. Illustrate the 8-bit result.

  Creating a payoff table for decision

Amy decided to select the best option which will minimize her total 36-month cost. Difficult is that Amy is not sure how many miles she will drive over next three years. Create payoff table for Amy's decision.

  Explain roles and influences of computers

Topic is "The Global Economy" . You will be writing the term paper replying to the following questions? Explain the roles and influences of computers and communications technology in increase of trans-border economic activity.

  Explain organizations pools markets and expertise

When output of some units can be used as inputs to othe units, or if two organizations pools markets and expertise which results in lower costs and generate profits it is frequently referred to as creating?

  Types of pre-created objects that can be used on web sites

Types of pre-created objects that can be used on Web sites. Describe the objects you find and what they are used for. Include links to the sites you used in your research.

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