{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exam2_A08_sol

exam2_A08_sol - Name SC 5 Th L 0 A5 Box ECE2801 EXAM#2 —...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Name: SC! 5 Th L 0 A5 Box: ECE2801 EXAM #2 — A Term 2008 Show all work. Circle final answers. Please sign and attached any scrap paper used. Points are as indicated. Good Luck! 1) Answer the questions below completely. (30 pts) a) CD quality digital audio recorders have traditionally used 16—bit analog to digital converters sampling at either 44.1Ksps or 48.0Ksps. What are the full- scale range, resolution and dynamic range (dB) of a 16-bit analog to digital converter if the ADC is supplied by a single 5V supply (and GND). 5V lb 9 F5? 3 a 028$0}u‘l\o«\= : TQSX/D'gv DR: 201253415) : Chagall: b) For the ADC above, what would the output of the converter be in hex for an input voltage of 2.2V? Woof 252“ 3495539; 128855 Alecia/tel v , ; I70A'3VNQ/fl- /_______.___. c) High-end 24 bit analog-to-digital converters are now being used by many in the music recording industry. What is the resolution and the dynamigiange (dB) of a 24-bit analog to digital converter if the ADC is supplied by a single 5V supply (and GND). What is the output code from this ADC for an input voltage of 1.1V. d) Sound intensity is often expressed as a Sound Pressure Level in dB. Given the table of sound pressure levels below, argue whether it makes sense or not to use 24—bit ADCs for commercial music recording. (Assume that you have REALLY, REALLY good speakers that would not limit the dynamic range of the recording!) Source of sound Sound pressure level . i (in Air) dB jeiéfigneat30§i 150dB Rifle being fired at 1 m r 7 7 7 71107113 iifieshokiofpanl if if 7 47_4H,;E§lgy [Hearing damage (due to short-term exposure like a rock concert) fiat 100m approx. 120 dB "110 — 140 dB“ Jack hammer at l m approx. 100 dB Hearing damage (due to long-term approx. 85 dB approx. 60dB Very calm room 20 — 30 dB Leaves rustling, calm breathing 10 dB Auditory threshold at 2 kHz 0 dB http://enw‘ikipedia.org/wiki/Sound_pressure ‘l’l/KQ lOQAQS+ ‘lv-o ‘HAQ SOL'l-es'i' SM 3, c) If the system clock and TimerBO settings from part (b) are used implement a stop watch which displays its time in seconds and hundredths of second (i.e. ss.hh), how long until the time displayed is off by 0.01 sec? Will the stop watch be fast or slow? 0| : «(0.08 — #(OflO‘tQQ‘W'? <3 46: 060000.448“! Ln—lervon/Q Op ££n+ % ooot SBCDCD'C3C> 5£1C6h~¢QJQ l {I'Lné Vw SOfiASl/Qa £2; W O-Ol So wash/k of.“ (UAE d) Implement an ISR for TimerBO, incorporating leap counting, to keep the accuracy of the clock to within 0.01 sec for a longer period than in part (c). #— pel‘me L E4PE£ 9000 I #pragma vector=TIMERBO_VECTOR __interrupt void TimerBO_ISR(void) { (0&6 // Assume mvtime and leap__cnt are Globalflunsigned int Lat (VQekp_CV\+ c LE errata-(J) ‘2 V‘Nj‘flme ++J 1 exp- cum-l: H3 3’ else Z 3 fleacgk crvl: :— O; 2) Assume TimerBO has been configured to implement a Coordinated Universal Time (UTC) style clock with 1 second resolution. The seconds elapsed since midnight 1 January 2008 are stored in the 32-bit variable unsigned long int utcTimer. (35 pts) a) If utcTimer=4,207,305 what day (month and date) and time (hrs, min, sec) ”9 18m Q“ m AG 3600 sec/k,» ; 3éa‘i00 SEC/AM L42073OS/86‘mo :- H<6.®q gbé £aJ-a/O :9 93 C4504“??? P g 9 O O «A E u E: J: S 3 5: “x U! m f‘ b) Both TimerBO and the system clock are now reconfigured. What is the exact time WK TimerBO is configured as shown below. Assume SMCLK=MCLK are now set to XTZCLK which is actually running at 8.0001 MHz? “Al”, .000‘ ”Ag void runtimerb(void) sMCLK fi (3 “:45 M fie ‘0 VJ L4 ‘ J lb 00 A‘ { (_ // / TBCTL = TBSSEL_2 + CNTL_ + MC_1 + ID_2; TBCCRO = 20000; TBCCTLO = CCIE; // enable Timer B0 interrupt } CLDBK: %.000\Mt+?=/L.\ :_ Q,ooooZ§ MHa‘fi T\me be+weevx Lni-e/fuqa‘lS; TBCCR—O CLOCK ((4%) o.ooqqqqgvgse¢ 3) A certain pressure sensor has a sensitivity of 0.98 mV/kPa (kiloPascal). The analog output of this pressure sensor is to be connected to the input of an analog— to-digital converter. Atmospheric pressure at sea level is approximately 14.7 psi which is equal to 1 atmosphere (latm) and 1.0 KPa = 0.145 psi.. (35 pts) a) The pressure sensor's data sheet lists its analog output range as 0-2.5V. What is the minimum number of bits that the ADC must have to be able to detect changes of 0.25kPa? (Do not assume that you must use the MSP430's built-in ADC12 ). Q 9ng ~ N - 4C l kpq -OJZSKPA J flesolt)‘l'\0¢\(Vr0/b>/b}+\: 0.0001Hg :: p3 / N (2213: 814734 109.0% 4 (£2 219:5qu ’Kjtmom a [q b;+ ADC. b) What is the dynamic range of the ADC from part (a). DR : :20 Q03 (1MB : 20 .Qm—QLOOGB 8%) :. ‘3‘15‘01 dfil c) What is the pressure in kPa associated with the full-scale reading of 2.5V if the minimum detectable pressure is actually 0.140 kPa (i.e. 0V corresponds to 0.140 kPa)? (2.3/3 0.98x10‘3v d) What is the dynamic range of the pressure sensor in dB? :— 2 s 5' l. lb K Pa Wm ; 0.140 KPox 2) as male :2 S s L )6 j 20 Q03“) < (9.1140 e) Assume that the output of the ADC from part (a) is read into the global variable unsigned int achressure. Write a C function that converts achressure to atmospheres. Mm void calc_atm() { plead vol+s_9e~r— MW PS'L-Perv km - 0 Head P5L—99V—Cuém = ILL? ‘Flo‘d voHs-P¢,_\o“+_—_ aooolgzé; “a“ 6‘3”“, «WA; ld-‘at- -' 0 DOOQZLS’ ){LPA = (aggl’ressure ie voHs—Per/h1*>/vo(+s-per,z<pxg aim LA‘L‘M ¥ PSL-Per~kPo\B/Psd-per,4‘iw\‘ J A‘xSpchuj Q25ul+ (ad-m) } f) If achressure=0xO 1AF, are you mountain climbing or scuba diving? Explain. GIAF heszrbl dieitlmd zap}; 1:. <L|3\ 4t 0.0001526 V/bi£>/O-OOOCLE M/Am MA =->(o7.H ‘ <(07 H vi/éPA 4f 6 ILl'S PSL/VQPA'y/N-m Am E we w M < \ am Wags“ \_. ...
View Full Document

{[ snackBarMessage ]}