{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Fall2010_Midterm_Solution

Fall2010_Midterm_Solution - BILKENT UNIVERSITY EEE212...

Info icon This 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
Image of page 1

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

View Full Document Right 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]
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern