Write the ritual that configures an output compare on pt1

Assignment Help Mechanical Engineering
Reference no: EM131090224

The objective of this problem is to measure body temperature using input capture (pulse-width measurement) (Figure 6.25). A shunt resistor is placed in parallel with a thermistor. The thermistor-shunt combination R has the following linear relationship for temperatures from 90 to 110°F.

Figure 6.25

850_139382f5-9ef8-4308-81da-4b9db063e4e2.png

In other words, the resistance varies from 100 k
to 80 k
as the temperature varies from 90 to 110°F. The range of your system is 90 to 110°F and the resolution should be better than 0.01°F. You will use a 74HC123. On the rise of the B trigger input, the 123 creates a negative logic pulse on its output. The width of the pulse is about 0.28⋅R⋅C. Temperature will be measured 100 times a second

a) The pulse-width measurement resolution will be 125 ns for the 9S12. Choose the capacitor value so that this pulse width measurement resolution matches the desired temperature resolution of 0.01°F.

b) Given this value of C, what is the pulse width at 90°F? Give the answer in both microseconds and E clock cycles.

c) Given this value of C, what is the pulse width at 110°F? Give the answer in both microseconds and E clock cycles.

d) Write the ritual that configures an output compare on PT1 as a periodic interrupt. A rising edge should occur every 10 ms. Configure an input capture on PT0 to measure the pulse width.

e) Show the interrupt handler(s) that perform the temperature measurement tasks in the background and sets a global, Temperature, 100 times a second. The units of this unsigned decimal fixed point number are 0.01°F. For example, Temperature will vary from 9000 to 11000 as temperature varies from 90 to 110°F. The output compare interrupt will start the pulse (You may assume the interrupt vectors are properly established, but please use simple interrupt handler names like TOC1handler() and TIC0handler().

Reference no: EM131090224

Questions Cloud

Why do juveniles get involved with crime : After watching ABC Primetime: Juvenile Corrections, and reading the chapter, answer the following questions: Why do juveniles get involved with crime? What are some differences and challenges human services professionals may face when working with..
Derive an equation that relates the distance d : Derive an equation that relates the distance d to the time of flight ?t.
What would be the better measure for central tendency : What would you say would be the better measure for central tendency? (i.e., mean, median, or mode) and why? How variable are the data? How would you describe this data?
Should one base morality on self-interest : Take one of the theories of moral duty that we've been studying (Utilitarianism or Natural Law) and answer the central question of this course: How much time and energy should I spend on myself or others?
Write the ritual that configures an output compare on pt1 : Given this value of C, what is the pulse width at 110°F? Give the answer in both microseconds and E clock cycles.
Construct a powerpoint presentation discussing : Construct a PowerPoint Presentation discussing the proper way to create a job-application letter and resume.
Compare and contrast the major theories of personality : Compare and contrast the major theories of personality. Discuss the major principles associated with personality theory. Understand the historical context of personality theory development.
Stories about her out of chronological order : What does it take for a secondary source to be academically credible? What should you look for to be certain the source is reliable? Tell your classmates what worked for you to find the source you will use for Essay 2. (just needs to make sense)
What are the main differences between the two approaches : What are the main differences between the two approaches? Discuss at least two pros and two cons of each approach. Does research gain from using the Big Five factor theory instead of using either Cattell's model or Eysenck's model? Discuss.

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  Calculate mass and the weight of oil that is being displaced

A metal block of mass 0.5kg is immersed in oil of density 850kg/m3, calculate the volume of oil that overflowed if the specific gravity of the block is 1.22.

  A 12 kn force is exerted on a rocker arm the moment of

a 12 kn force is exerted on a rocker arm. the moment of inertia i of the crosssectionnbspwith respect to the

  Find the location of the stagnation point at the nose of

superpostion of a uniform flow in the x-direction of velocity u and a 2-d source of strength q produces potential flow

  Work and heat are transferred to the nitrogen over the

nitrogen with a mass of 4.4 lb is contained in a closed rigid tank at 27 degree c. work and heat are transferred to the

  Find the maximum bending stresses sface and score

Find the maximum bending stresses σface and σcore in the faces and the core, respectively, if their respective moduli of elasticity are 4 ×106 psi and 1.5 ×106 psi.

  Consider an ideal vapor-compression refrigeration cycle the

consider an ideal vapor-compression refrigeration cycle. the refrigerator employs refrigerant 134a as the working fluid

  Smooth inner surface of a hemispherical bowl

The 500-g rod AB rests along the smooth inner surface of a hemispherical bowl. If the rod is released from rest from the position shown, determine its angular velocity at the instant it swings downward and becomes horizontal.

  Water flows through a pipe ab 12 m diameter at 3 ms and

water flows through a pipe ab 1.2 m diameter at 3 ms and then passes through a pipe bc 1.5 mdiameter. at c the pipe

  Estimate the radiation reaching the earth

Please use the radiation fundamental and sun’s size to recalculate the sun radiation power and mass loss rate. Please also estimate the radiation reaching the earth!

  If solar radiation is incident on the spacecraft at a rate

would a flagpole made of steel or aluminum freeze ones tongue to it faster? why? thermal conductivity 2. the outer

  Consider a cable box with a tamper resistant

Consider a cable box with a tamper resistant private key inside it. Can you imagine a side-channel attack on the above implementation to find the private key? Hint: Can you do something with a multimeter?

  Determine the new velocity v of the center of the disk as

a unifrom circular disk which rolls with a velocity v without slipping encounters an abrupt change in the direction of

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