{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Fall2010_quiz1_solution

Fall2010_quiz1_solution - BILKENT UNIVERSITY Department of...

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

View Full Document Right Arrow Icon
BILKENT UNIVERSITY Department of Electrical and Electronics Engineering EEE212 Microprocessors QUIZ 1 14-10-2010 Fall Semester Section 1 Open book, closed notes no calculators. Use the boxes provided for your answers. Show all your calculations! Duration: 40 minutes Question 1 (40 points) Question 2 (30 points) Question 3 (30 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
1) [40 pts] a) Assume that a different version of microcontroller from the 8051 family (Let’s call it 805X) uses 4 clock periods per machine cycle (A machine cycle period is four times the clock period). The external clock frequency (XTAL) is 8 MHz . The machine cycles for some instructions are given for this family in the following table. Write a delay subroutine to generate an approximate delay around 20 milliseconds. (Consider the execution time of only the innermost loop) Machine Cycles INSTRUCTION 805X MOV RX, #Data 2 DJNZ RX, Label 4 RET 3 XTAL period=1/8x10 6 s=0.125 μ s MC = 4x 0.125=0.5 μ s 20ms=40000 MC DJNZ takes 4 MC, so we need 10000 repetitions Code: DELAY: MOV R1,#40 LOOP1: MOV R2,#250 LOOP2:
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