Embedded Systems Exam 2 - Fall 2007 - MacDonald, Exams of Microprocessors

An excerpt from an embedded systems exam, including problem statements and instructions for filling out a table and writing subroutines. The problems involve interrupt handling, initialization of a real time interrupt, and configuring pwm channels.

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-3z2
koofers-user-3z2 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EE3376 – Embedded Systems - Fall 2007 - Exam 2 – MacDonald – Page 1
Student Name:_______________________________ Student ID: _______________
Problem 1
A section of the main program is running shown below and is in the middle of
executing the inx instruction when a RTI periodic interrupt occurs. The ISR is
shown in below as well and is a contrived example. Fill out the table describing
register and memory values at different points throughout the sequence
MAIN CODE ISR
---------------------------------------- ----------------------------------
rti_isr: ldy A, X
inca iny
inx IRQ occurs here inca
ldy A, X sty A, X
rti
Table 1
Location Prior to INCA Just after INX
Just after RTI Just after LDY
reg A $0F
reg B $08
reg D
reg X $1FF0
reg Y $0000
Mem $2000 $12
Mem $2001 $34
Mem $2002 $56
Mem $2003 $78
pf3

Partial preview of the text

Download Embedded Systems Exam 2 - Fall 2007 - MacDonald and more Exams Microprocessors in PDF only on Docsity!

Student Name:_______________________________ Student ID: _______________ Problem 1 A section of the main program is running shown below and is in the middle of executing the inx instruction when a RTI periodic interrupt occurs.shown in below as well and is a contrived example. Fill out the table describing The ISR is register and memory values at different points throughout the sequence

MAIN CODE ISR

rti_isr: ldy A, X inca iny

inx IRQ occurs here inca

ldy A, X styrti A, X

Table 1

Location Prior to INCA Just after INX Just after RTI Just after LDY reg A $0F reg B $ reg D reg X $1FF reg Y $ Mem $2000 $ Mem $2001 $ Mem $2002 $ Mem $2003 $

Student Name:______________________________ Student ID: _______________ Problem 2 (30 pts) Write an initialization subroutine for the Real Time Interrupt so that it will interrupt approximately every 4 uS.find the address in the register section of your class notes.). (Hint: RTR values are below and you can

Show calculations for any credit. Use actual addresses for registers.