Fall2010_Midterm_Solution

Fall2010_Midterm_Solution - 25-11-2010 BILKENT UNIVERSITY...

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

View Full Document Right Arrow Icon
25-11-2010 BILKENT UNIVERSITY EEE212 Microprocessors – 2010 Fall Semester Midterm Open TextBook Closed Notes , Calculators Allowed Use the boxes provided for your answers! Use comments for readability , otherwise the programs will be partially graded! Duration: 1 hour 50 minutes Q1 (30 points) Q2 (20 points) Q3 (25 points) Q4 (25 points) TOTAL SOLUTION
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Q-1) [30 pts] Answer the following questions. Show your calculations clearly and provide explanations if needed. a) [7 pts] Write down the values of the Accumulator and CY (carry), AC (auxiliary carry), OV (overflow) and P (parity) flags after the following code is executed. MOV A,#0DBH ACC: 59H CY: 1 AC: 1 OV: 0 P: 0 MOV R0,#7EH ADD A,R0 b) [7.5 pts] Among the following instructions which ones generate error during assembly? Put an ‘E’ in the blank next to the instruction you think that will not assemble correctly. Assume that the label ‘HERE’ exists in the code. ADD A,@R0 ____ ADD B,R1 __ E _ JB 20H, HERE ____ PUSH A _ E _ CJNE @R0,#11,HERE ____ ANL 00H,#00H ____ JNZ R2,HERE _ E __ ADC A,#FFH __ E _ MOV 12H,@R2 __ E _ c) [7.5 pts] Assume that XTAL is 44.2368 MHz for an 8051 microcontroller. To perform serial communication with a baud rate of 28800 bps, what should be the value of TH1 register? What is the bit duration (the time a single bit remains on the transmission line) for this communication? (Assume that SMOD bit is 0). TH1: -4 (FC H) Bit duration: 1/28800 s Baud rate=timer overflow rate/32 28800= 44.2368x10 6 /12/(256-TH1)/32->TH1=256-44.2368x10 6 /28800/32 = 256-4=252 = - 4 = FCH Bit duration=1/28800 = 34.72 μ s d) [8 pts]
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/09/2012 for the course CS cs464 at Bilkent University.

Page1 / 6

Fall2010_Midterm_Solution - 25-11-2010 BILKENT UNIVERSITY...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online