EE319K_EXAM1_A_2010 - EE319K Spring 2010 Exam 1A Page 1...

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

View Full Document Right Arrow Icon
EE319K Spring 2010 Exam 1A Page 1 Jonathan W. Valvano February 24, 2010 2:00pm-2:50pm First:_________________ Last:_____________________ This is a closed book exam. You must put your answers pages 1,2,3 only. You have 50 minutes, so allocate your time accordingly. Show your work, and put your answers in the boxes. Please read the entire quiz before starting. (5) Question 1. Consider the hexadecimal number $A5. If the format is 8-bit signed, what decimal number does this represent? (5) Question 2. Consider the following display of a digital voltmeter. Part a) The voltmeter reads from 0.0000 to 3.9999V. How many decimal digits is the voltmeter? Part b) If you were asked to implement this voltmeter using a microcontroller, what is the minimum number of ADC bits you could use? (5) Question 3. Consider the following two instructions ldab #-1 addb #1 What will be the value of the overflow (V) bit? What will be the value of the carry (C) bit? What will be the value of the zero (Z) bit?
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 Spring 2010 Exam 1A Page 2 Jonathan W. Valvano February 24, 2010 2:00pm-2:50pm (5) Question 4. What resistor value do you need to interface this LED to the 9S12? The desired operating point is 1.9V at 1 mA. At 1mA you can assume the V OH of the 9S12 will be 4.9 V. R PP0 (10) Question 5. Consider the following piece of code that starts at main $4035 CF4000 main lds #$4000 $4038 860A ldaa #10 $403A 0703 loop bsr Output $403C 0430FB dbne A,loop $403F 36 Output psha Hand execute this program up to and including the first execution of psha Fill in specific hexadecimal bytes that are pushed on the stack. Using an arrow label to which box the SP points. Not all the boxes will be used. (10) Question 6. Assume PC is $5000, and Register D is initially $2233. You may assume location $0812 and $0813 are initially 0. Show the simplified bus cycles occurring when the subd instruction is executed. In the “ changes ” column, specify which registers get modified during that cycle, and the corresponding new values. Do not worry about changes to the CCR. Just show the one instruction. $5000 B30812 subd $0812 R/W Addr Data Changes to D,X,Y,S,PC,IR,EAR (10) Question 7. Draw the circuit diagram interfacing this switch using negative logic. I.e., if the switch is not pressed the PT1 input should be high, and if the switch is pressed, the input should be low. Please specify the resistance values for the resistors and the chip numbers (e.g., 7406) for any digital logic you use. PT1 9S12 $3FFD $3FFC $3FFF $3FFE $3FFB
Background image of page 2
EE319K Spring 2010 Exam 1A Page 3 Jonathan W. Valvano February 24, 2010 2:00pm-2:50pm For questions 8 and 9, don’t worry about establishing the reset vector, creating a main program, or initializing the stack pointer. You may use the following definitions PTT equ $0240 DDRT equ $0242 PTP equ $0258 DDRP equ $025A (20) Question 8. Assume Sg is a signed 16-bit global variable. Transfer the following C-code into assembly language. I.e., clear Port T bits 1 and 0 if Sg is greater than or equal to 100. You may assume
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 11/03/2010 for the course EE 319K taught by Professor Bard during the Spring '08 term at University of Texas at Austin.

Page1 / 6

EE319K_EXAM1_A_2010 - EE319K Spring 2010 Exam 1A Page 1...

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