Fall2010_quiz1_solution

Fall2010_quiz1_solution - BILKENT UNIVERSITY Department of...

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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:
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 / 4

Fall2010_quiz1_solution - BILKENT UNIVERSITY Department of...

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