Quiz3F07 - EE319K Fall 2007 Quiz 3 Page 1 of 8 First:_...

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

View Full Document Right Arrow Icon
EE319K Fall 2007 Quiz 3 Page 1 of 8 Jonathan W. Valvano November 28, 2007 10:00am-10:50am First:________________ Last:____________________ This is a closed book exam. You must put your answers on this piece of paper only. You have 50 minutes, so allocate your time accordingly. Please read the entire quiz before starting. (5) Question 1. (5) Question 2. (5) Question 3. (5) Question 4. (5) Question 5. (15) Question 6. PM2 PM3 PM1 PM4 PM0 Vout (5) Question 7. (5) Question 8. (5) Question 9. (5) Question 10.
Background image of page 1

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

View Full DocumentRight Arrow Icon
EE319K Fall 2007 Quiz 3 Page 2 of 8 Jonathan W. Valvano November 28, 2007 10:00am-10:50am (5) Question 11. (5) Question 12. (30) Question 13. org $3800 ; RAM Second rmb 1 ; increment this every second org $4000 ; EEPROM main lds #$4000 ; initialize stack ; initialize output compare 7 loop bra loop ; main program does nothing ;output compare 7 interrupt service routine OC7han ; set the output compare interrupt vector org $FFFE fdb main ; reset vector
Background image of page 2
EE319K Fall 2007 Quiz 3 Page 3 of 8 Jonathan W. Valvano November 28, 2007 10:00am-10:50am (5) Question 1. Specify the proper order of events occurring during the context switch from foreground (main program) to background (interrupt service routine, ISR). Push registers means Push PC, Y, X, A, B, and CCR on the stack. A) Finish instruction, push registers, I=1, PC=vector, execute ISR. B) Finish instruction, push registers, clear trigger flag, I=1, PC=vector, execute ISR. C) Finish instruction, push registers, I=0, PC=vector, execute ISR. D) Finish instruction, I=1, push registers, PC=vector, execute ISR. E) Finish instruction, I=1, push registers, clear trigger flag, PC=vector, execute ISR. F) Finish instruction, I=0, push registers, PC=vector, execute ISR. G) None of the above (5) Question 2. Consider a 12-bit ADC with a range of 0 to +5V. What is the approximate resolution of this ADC? Give units. (5) Question 3. There are three decimal fixed-point numbers. The height, H , and the width, W , have a resolution of 0.01 cm. The area, A , has a fixed-point resolution of 0.01 cm 2 . Let IH be the integer part of H , let IW be the integer part of W , and let IA be the integer part of A .. The goal is to calculate area, A = H * W . Show the mathematical equation needed to calculate IA in terms of IH , IW and numerical constants. Your answer will look something similar to IA = IH + IW*2 Questions 4 and 5 involve the following assembly program involving one 16-bit parameter passed on the stack and one 8-bit local variable, also on the stack. main lds #$4000 movw #1000,2,-sp ; pass 16-bit in parameter on stack jsr sub2 leas 2,s ; balance stack, discarding the in parameter here bra here in set xxx ; binding of 16-bit input parameter cnt set yyy ; binding of 8-bit local variable sub2 des ; allocate 8-bit local variable called cnt psha ; save register A pshx ; save register X ;****body of the subroutine ; . ...... other stuff. ...... ldx
Background image of page 3

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

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

This note was uploaded on 09/28/2008 for the course EE 319K taught by Professor Bard during the Spring '08 term at University of Texas at Austin.

Page1 / 8

Quiz3F07 - EE319K Fall 2007 Quiz 3 Page 1 of 8 First:_...

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

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