Quiz3_sample1 - BILKENT UNIVERSITY Department of Electrical...

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 3 - SOLUTIONS 21-04-2010 Section 1 OPEN BOOK, CLOSED NOTES, NO CALCULATORS Duration: 40 minutes Surname : Name : ID Number : Section : Signature : Question 1 (70 pts) : Question 2 (30 pts) : TOTAL :
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) (70 pts) Write a program using interrupts to read P0 once in every 217 μ sec and toggle bit P1.0 if the new value is different from the previously read value. (You can assume that the initial value of P0 is zero). At the same time, your program should be able to receive data through the serial port and store the incoming bytes at the RAM location whose address is stored in R0. Assume that XTAL frequency is 11.0592 MHz and the baud rate of the serial communication is 4800bps. ORG 0 LJMP MAIN ORG 000Bh ; timer 0 vector address LJMP TMR0 ORG 0023h ; serial port interrupt entry LJMP SERIAL ORG 0030h MAIN: MOV TMOD,#22h ;both timers mode 2 autoreload MOV IE,#10010010b ;Enable timer 0 and serial interrupts
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 10/23/2011 for the course ENGINEERIN 102 taught by Professor Pablo during the Spring '11 term at Bilkent University.

Page1 / 3

Quiz3_sample1 - BILKENT UNIVERSITY Department of Electrical...

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