ANSFA - E C E 4 1 7 5 A F in a l 4 -3 0 -0 9 N IN E PR O B...

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

View Full Document Right Arrow Icon
ECE 4175A Final 4-30-09 Page 1 of 3 High 103 NINE PROBLEMS Upper quarter 87 Open book, open notes Median 82 Lower quarter 72 Low 47 1. [ ] I have completed the CIOS course evaluation. [5%] [ ] I have not completed the CIOS course evaluation. 2. A retriggerable one-shot is a device that generates an output pulse in response to a rising input edge. A resistor and capacitor connected to the device sets the pulse width (e.g.,two seconds). The “retriggerable” [20%] feature means that if another rising edge occurs while the output pulse from a previous rising edge is still being generated, the pulse extends for another two seconds from the time of this new edge. For this problem you are to write a function called OneShot that is called each time around the ten- millisecond main loop and that examines a global char variable called TRIGGER . If TRIGGER is set to a non-zero value, OneShot clears TRIGGER to zero and initiates the generation of a two-second output pulse on pin RE2 of PORTE and returns. At the end of two seconds worth of loop times, RE2 is cleared. If while RE2 is set, OneShot is called and finds TRIGGER again set to a non-zero value, RE2 is continued set for another two seconds from this point. Use a local static unsigned char variable called TRIGCNT to keep track of the two-seconds worth of loop times. void OneShot() { static unsigned char TRIGCNT = 0; if (TRIGGER) { TRIGGER = 0; PORTEbits.RE2 = 1; TRIGCNT = 0; } if (TRIGCNT == 99) {PORTEbits.RE2 = 0;} else {TRIGCNT++;} } 3. Assume that the Timer3/CCP1 input capture mode of the 4321 chip is using Fcpu = 1 MHz as its clock. The leading edge of a pulse is captured into the sixteen-bit register, CCPR1, as 0xFEDC while the trailing [ 5%] edge is captured as 0x1234. What is the pulsewidth (expressed in microseconds), assuming no aliasing has occurred? Show all work clearly. 0x1234-0xFEDC = 0x1234+(0x0123 + 1) = 0x1358 = 4952 : s 4. I have ordered a $35 2x20 character Noritake VFD display similar to the one Glen Akins used in his Inclinometer. It is specified to (typically) draw 130 mA when all its pixels are turned on but only 2 mA [15%] when all are turned off. Once the display has been sent its message to be displayed, the pixels can be turned off by sending the command 0x08 and turned back on by sending the command 0x0C. a.
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 Spring '08 term at Georgia Institute of Technology.

Page1 / 3

ANSFA - E C E 4 1 7 5 A F in a l 4 -3 0 -0 9 N IN E PR O B...

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