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

  Policies and provisions to unbundled network elements

What are some of the major policies and provisions under the 1996 Act in regards to unbundled network elements (UNEs).

  Actions against company security camera

Joe the janitor is recorded on the company security camera one night taking pictures with his cell phone of the office of the CEO after he is done cleaning it. What will you do and what is your justification for your actions?

  Staffing level requirements for project team

Describe in scholarly detail how you would use WBS as aid to finding staffing level requirements for project team?

  Address three components represented in cell

Assume that a security model is needed for protection of information in your class. Write a brief statement on how you would address the three components represented in that cell.

  Replacing a lower rpm disk

Is it true that replacing a lower RPM disk with a higher RPM disk would always result in disk performance improvements? Why?

  Explain type to reveal computer to be computer

Explain why you think these questions would be the type to "reveal" the computer to be a computer? Why would these responses have to be given a human begin?

  Tools or tactics for risks for computing infrastructure

As part of project to assess security risks for computing infrastructure, you have found that other managers often have different idea. List any tools or tactics that could be used.

  Factors finding whether something is politically feasible

Describe political feasibility. What factors go into determining whether something is politically feasible in an organization? Answers may include whether a sponsor exists

  Select processor or disk for economical view

Similary there is set of disk drives for $7000 which promises two and half times the throughout of your existing disks. Then in economical view whether processor or disk is to select for your computer?

  Function whose job is to input

Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. A. unsigned readA();

  Create an incident-response policy

Create an incident-response policy that covers the development of incident-response team, disaster-recovery processes, and business-continuity planning.

  How many disk i-o operations needed to read contents

How many disk I/O operations might be need to read contents of small local file at /a/b/c? suppose that none of disk blocks is presently being cached.

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