EE319K-FinalS11 - 1/11 EE 319K Spring 2011 Final Exam...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1/11 EE 319K Spring 2011 Final Exam Ramesh Yerraballi TTh Full Name(eid) : BME: Yes/No Duration : 3 hours This is a closed book exam; You may use your calculators; Write answers within the space (box) provided after each of the questions. There are 9 questions on the test, read all of them first so you may properly allocate your time to answer them. Please provide comments for all code you write to help understand your answer and possibly award you partial credit. You may use the back of the sheets for extra space. 1. [ 4 pts ] What are the phases in instruction execution? Which phase involves checking for interrupts? 2. [ 6 pts ] On the 9S12 what is the shortest time for one increment of the TCNT? Also, what are the E-Clock and TSCR2 values that give you this shortest time? 3. [ 6 pts ] What is the slowest time you can get one ADC sample conversion on the 9S12? Also, what are the values of E-Clock ( f E ), m , s and n that give you this value? Hint: ADC conversion time = 2(m+1)(s+n)/f E See attached table for s values. Page 2 of 9 4. [ 8 pts ] We wish to pass an array of 10 numbers from assembly code to a C subroutine that finds the minimum of the 10 numbers and returns it. You have to write the assembly calling code snippet and the complete C routine that does this. The assembly declaration of the array is given. You may assume that the array is initialized for you. Hint : Pointer to Array Assembly Caller Code C Callee Code ; 10 unsigned chars Numbers rmb 10 … ; Array is initialized here ; Put your code to set up the ; parameter(array) to pass to ; the C routine here jsr fMin ;Call C routine fMin ; and pass it appropriate ; information needed to ; to find the max and ; return it in register B //Write the C routine that finds the // the minimum element of the array // sent to it by the Caller 5. [ 6 pts ] What is the output voltage V out when PT1 is high and PT0 is low? Assume V OH is 5V and V OL = 0V. Page 2 of 9 4. [ 8 pts ] We wish to pass an array of 10 numbers from assembly code to a C subroutine that finds the minimum of the 10 numbers and returns it. You have to write the assembly calling code snippet and the complete C routine that does this. The assembly declaration of the array is given. You may assume that the array is initialized for you. Hint : Pointer to Array Assembly Caller Code C Callee Code ; 10 unsigned chars Numbers rmb 10 … ; Array is initialized here ; Put your code to set up the ; parameter(array) to pass to ; the C routine here jsr fMin ;Call C routine fMin ; and pass it appropriate ; information needed to ; to find the max and ; return it in register B //Write the C routine that finds the // the minimum element of the array // sent to it by the Caller 5. [ 6 pts ] What is the output voltage V out when PT1 is high and PT0 is low? Assume V OH is 5V and V OL = 0V. Page 3 of 9 6. [ 8 pts ] When programming with three output compare interrupts, is it possible that one of the interrupt service routines never gets a chance to run? If your answer is “yes”, describe in detail interrupt service routines never gets a chance to run?...
View Full Document

This note was uploaded on 02/20/2012 for the course EE 319K taught by Professor Bard during the Fall '08 term at University of Texas at Austin.

Page1 / 11

EE319K-FinalS11 - 1/11 EE 319K Spring 2011 Final Exam...

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