ANS1 - 1. [ 25 % ] H igh 100 U ppe r qua rte r 87 M e dia n...

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

View Full Document Right Arrow Icon
ECE 4175 QUIZ 9-24-08 (1 of 2) High 100 SEVEN PROBLEMS Upper quarter 87 Open book, open notes Median 82 Lower quarter 69 Low 46 1. Consider the following function taken from a qwik.lst file. Assume that this has been generated from a function called “DisplayRX.” Bit 5 of the PIR1 register is called RCIF. Recreate the C code for the [25%] DisplayRX function to the right of the lines below. void DisplayRX() { 0588 AA9E BTFSS PIR1,5 if (PIR1bits.RCIF) 058A D004 BRA L072 { 058C 50AE MOVF RCREG,W LCDSTRING[3] = RCREG; 058E 6E0C MOVWF LCDSTRING+3 0590 0E01 MOVLW 0x01 LCDFLAG = 1; 0592 6E3C MOVWF LCDFLAG } 0594 0012 L072 RETURN } 2. A question has arisen about QwikBug’s single stepping operation. We want to know whether the latest line that is highlighted in the source file window in response to a step command has (1) just been [15%] executed or (2) will be executed in response to the next step command. To check this, consider how we might use the following BlinkAlive function and note when the LED turns on in response to single stepping. void BlinkAlive() { PORTDbits.RD4 = 0; // Turn off LED if (++ALIVECNT == 250) // Increment counter and return if not 250 { ALIVECNT = 0; // Reset ALIVECNT PORTDbits.RD4 = 1; // Turn on LED for 16 ms every 4 secs } } a. If you set a breakpoint on the ALIVECNT = 0; line and then run to the breakpoint, will the LED be turned on at that point? [ ] Yes [ x ] No b. When the PORTDbits.RD4 = 1; line is highlighted, if the LED is not turned on, then what can you
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.

This note was uploaded on 02/08/2011 for the course ECE 4175 taught by Professor Peatman during the Fall '08 term at Georgia Institute of Technology.

Page1 / 2

ANS1 - 1. [ 25 % ] H igh 100 U ppe r qua rte r 87 M e dia n...

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