Midterm Exam Solutions Fall 2023

First-page document preview for Midterm Exam Solutions Fall 2023 in BME 538: Microprocessor Systems at Toronto Metropolitan University (TMU). Inspect the first page below or request the complete PDF study document for free.

Independent study archive Learn more

Materials are uploaded by users for self-study purposes. PwnHero is an independent platform, not affiliated with, sponsored by, or endorsed by any university or institution.

📄 Page 1 Preview
First page preview of Midterm Exam Solutions Fall 2023 for Microprocessor Systems at Toronto Metropolitan University (TMU)

Page 1 Key Topics & Excerpt

🔍 Text Transcript

First page excerpt for quick study reference. Complete formulas, diagrams, and subsequent pages are available in the full document.

PwnHero I Student Name: Student ID: Ql [18 marks (1.5 marks each)] Use a pen to circle the right answer(s) a) For applications with more than one managed PSV pages, JSR declaration header is / i. void _attribute_ (( _interrupt_)) mylnterruptHandler(void) +- ® void _attribute_ (( _interrupt_,no_auto_psv)) mylnterruptHandler(void) ~iii. void _attribute_ (( _interrupt_, auto_psv)) mylnterruptHandler(void) iv. void _attribute_ (( _interrupt_,multiple_psv)) mylnterruptHandler(void) b) Instruction frequency Fcv is derived from the oscillator frequency as follow: q) Fcv=Fosd2 11. Fcv=Fosd4 iii. Fcv=Fosc iv. Fcv=Fosd8 c) .,.Q.ne of these registers is used to c nfigure MCU oscillator at power on '-!.) OSCCON ii. CLKDIV 111. OSCTUN ~v. CONFIG2 d) #J>ragma config FNOSC = FRCPLL sets thC/e MCU oscillator as GJ Fast RC oscillator with PLL ii. Primary oscillator with PLL 111. Low-power RC oscillator 1v. Fat RC oscillator with postscalller divider e) The result of the logical bit shift operation 0xC9<<3 is i. 0x4F i2-. q @ 0x48 c_/, do 1 00 I 111. 0xC8 o \ o o I o D o IV. None of the above l-\ -~ f) Interrupt Vector is / i. The starting address of the main function code V ii. Contains the interrupt vectors for all ISRs @ The starting address of~ ISR . . . iv. A single bit is set each time an mterrupt IS activated g) The test statement in while((PORTF & 0x0008)=0), i. Returns true if RF8 = 0 / \ oo D ii. Returns false if_ RF8 = 0 V '.!i 1 ' 0 @Returns true if _RF3 = 0 iv. Returns true if RF3 = 1 h) For 20 milliseconds delay, Fcv=4 MHz, and Timer 2 prescaler 1:64, the Period Register (PR2) is set to 1. 1251 ii. 1250 -' 2 PwnHero.com

Related BME Courses at Toronto Metropolitan University (TMU)