FinalF08bSol - EE319K Fall 2008 Final Exam Version B Page 1...

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

View Full Document Right Arrow Icon
EE319K Fall 2008 Final Exam Version B Page 1 Jonathan Valvano December 12, 2008 (4) Question 1. We can hear sounds from about 20 to 20 kHz, thus we say the frequency components of sound exist from 20 to 20 kHz. The Nyquist Theorem requires you to sample at a rate strictly larger than twice the maximum frequency components of the signal. Thus in this case, we must sample larger than 800 Hz. Recall in lab the distance signal was 0 to 2 Hz, and we sampled at 5 Hz. (4) Question 2. A) The motor will not spin at all because we did not wait in between each output to the motor. (4) Question 3. Write a subroutine to sample ADC channel 4 of the 9S12DP512. ADC_In movb #$84,ATD0CTL5 ;start ADC channel 4 brclr ATD0STAT0,#$80,adcwait ; wait for SCF ldx ATD0DR0 rts (8) Question 4. 0 maps to 0 and 2047 maps to 1000. When Vin is 10 V, the ADC is 2047, software converts 2047 into 1000. Multiply by 1000, then divide by 2047 ldy #1000 emul ldx #2047 ediv (4) Question 5. The trick is the sty instruction overwrites the data saved on the stack by the stx instruction. RegX will be $7855 (4) Question 6. The order is B) 1,6,3,2,5,4,7 1) There is data in the receive data register and the hardware sets the flag bit (e.g., RDRF=1)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

FinalF08bSol - EE319K Fall 2008 Final Exam Version B Page 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online