Show the software that goes in the eeprom

Assignment Help Mechanical Engineering
Reference no: EM131089999

The objective of this problem is to design a DAS alarm. An alarm should sound when noise is present in the room. Assume the output of the microphone, x(t), is a ±10 mV differential signal. The signals of interest are 100 to 500 Hz. You will sample the sound and calculate the sound energy once a second (sum of the signal squared). Be careful to subtract off the DC so that a quiet room (microphone = 0) results in an energy calculation of zero. If data are the 8-bit ADC, then x(n) = data - 128 represent the current 8-bit signed sample. If you sample at 1000 Hz, sound the alarm if (x(0) + x(1)+ . . . + x (999)) greater than 100,000. 32-bit-long integer operations are allowed. The 9S12 system has an 8-MHz E clock. The alarm can be activated by driving 20 mA through a 5-V EM relay. The software should turn on the alarm if the energy level is above a threshold (simply pick any constant). Once on, the alarm should continue until the operator types the code "213" on the keypad. This 9S12 will have a secret code of 213, but allow each 9S12 to have a different three-number code and a different threshold. The computer is dedicated to this task.

a) Show the analog interface between the differential microphone output and the 9S12 ADC channel 2. Choose the appropriate op amp circuit, gain, offset, and analog filter. The Analog Devices AD680 is a three-wire, low-cost, 2.5 V reference (+5 V input, ground +2.500 V output). This is a qualitative, and not a quantitative, DAS.

Design the interface between the 9S12 signal B0 and the EM relay (Figure 12.62). To activate the alarm, the relay coil requires a voltage between +3.5 and 6.0 V and a current of 20 mA.

Figure 12.62

1698_943e3fdd-d867-449b-a0d3-bcd2e312ef40.png

c) Show the interface between the keypad and the 9S12 (Figure 12.63). Each switch will bounce for about 10 ms, so you must implement a way to debounce. No other 9S12 connections may be used for this interface (although you may use the internal features of input capture/output compare). Your solution should minimize cost. Periodic polling should be used for this keypad because it is cheaper.

Figure 12.63

641_564dc71e-642c-4404-87eb-9ebad40ddeaf.png

d) Include all of the software that will exist in the system. Your solution will be segmented into three parts: RAM, EEPROM, and ROM. Specific software requirements include the following:

Other than a one-time initialization, there will be no foreground (main) program

Use the ADC continuous scan mode to simplify the software

Clearly show where the 9S12 is to begin execution on a power on reset

d1) Show the software that goes in the RAM (uninitialized on power up).

d2) Show the software that goes in the EEPROM (nonvolatile, but can be different for each device).

d3) Show the initialization (ritual) software that goes in the ROM (nonvolatile, and must be the same for each device). This is where your system starts executing. Assume the two interrupt vectors are set by the compiler.

d4) Show the 1 kHz DAS interrupt handler that goes in the ROM (nonvolatile, and must be the same for each device). It is here that you will turn on the alarm if the sound energy goes above threshold.

d5) Show the keypad periodic polling interrupt handler that goes in the ROM (nonvolatile, and must be the same for each device). It is here that you will turn off the alarm if the operator types in the secret code.

Reference no: EM131089999

Questions Cloud

How does popenoe define familism : What does Popenoe see as some of the major forces (political, economic, social/cultural) contributing to "family decline?" How does Popenoe define "familism? Where does familism fit into his thesis of family decline
Minimum percentage increase in the value of warrant : The common stock has a current market price of $38 per share and the warrant's market price is $4. If the market price of the stock increases to $41.80, the minimum percentage increase in the value of the warrant is?
How you would collect and analyze the data : Describe the variables in your study. Indicate whether they are independent, dependent, moderating, or intervening. Describe the relationship among the variables. Tell how they will be measured.
Economic and sociological theory of marriage : What are the fundamental differences and similarities between the "economic" theory of marriage and the "sociological" theory of marriage
Show the software that goes in the eeprom : Show the software that goes in the RAM (uninitialized on power up).
Total market value of the rxr company : On January 1, the total market value of the RXR Company was $100 million. During the year, the firm plans to raise and invest $30 million in a new project. Compared to the risks of the firm's existing assets, the project is about average-risk. The..
How sexual awakening has to destabilize society : The Shulamite seems trapped between her desire and her reasoning. She warns the ‘Daughters of Jerusalem' not to awaken love before it is ready, indicating that she believes she has done just that. Yet, the poem is a celebration of this awakening.
Equipment for the replacement to be worthwhile : Find the max amount the firm would be willing to pay for the new equipment for the replacement to be worthwhile.
What do you think of gm foreign exchange policies : What do you think of GM's foreign exchange policies? How would you advise them about possible changes to their policies? What would happen to GM's income statement if the Canadian dollar moved strongly, in either direction?

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  Determine the time duration t of the elevator run

The main elevator A of the CN Tower in Toronto rises about 349 m and for most of its run has a constant speed of 22 km/h. Assume that both the acceleration and deceleration have a constant magnitude of g/3 and determine the time duration t of the ..

  A completely reversible heat pump produces heat at a rate

a completely reversible heat pump produces heat at a rate of 300 kw to warm a house maintained at 24degrees c.the

  Formula for converting degrees fahrenheit to degrees celsius

What would be the formula for converting degrees Fahrenheit to degrees Celsius? what temperature would be the equal number of degrees in both Fahrenheit and Celsius scales?

  Calculate the vertical displacement

calculate the vertical displacement at D and the horizontal displacement at Free-Body Diagram should be recalculated with P and Q.

  Saturated water vapor at 400 is heated at constant pressure

saturated water vapor at 400? is heated at constant pressure until its volume has doubled. determine the final

  Kind of problem an angular momentum-impulse equation

Explain in 4 to 5 sentences at least in what cases/in what kind of  problem  an angular momentum-impulse equation and concept can be reduced  to conservation of angular momentum. Give an example of a problem where conservation of angular momentum is ..

  Find the moment of inertia of a hoop

Find the moment of inertia of a hoop ( a thin -walled, hallow ring) with mass 5 kg and radius 2m about an axis perpendicular to the hoop's plane at an edge.

  Design the pump power and the diameter of brunching pipes

Design the pump power and the diameter of brunching pipes D1, D2, D3, so that the flow rate coming into all buildings are Q1=Q2=Q3=4.5m^3/hr, when all four valves v, V1, V2, V3 are open.

  An hydraulic turbine operates under an available head of

an hydraulic turbine operates under an available head of 85 m at a flow rate of 0.25 m3s. the electrical power output

  Determine the axial force and deformation of the diameter

a cylindrical bar of radius 15 mm and length 100 mm is held at both ends. if at 30degc no axial force exists in the bar

  Determine the max value of p the max stress in the tempered

two tempered steel bars each 316 in thick are bonded to a 12 in mild steel bar. this composite is subjected as shown to

  What is the force p to keep the system in equilibrium

What is the force P to keep the system in equilibrium for the angles specified?

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