Docsity

Embedded Systems Exam 2 - Spring 2008 - Problem Solutions, Exams of Microprocessors

Toggle sidebar
bg1
EE3376 โ€“ Embedded Systems - Spring 2008 - Exam 2 โ€“ MacDonald โ€“ Page 1
Student Name:______________________________ Student ID: _______________
Problem 1
Write a subroutine that will initiate an 8-bit single conversion sequence on channel
7, wait for the results to become valid (through polling) and then transfer the
result(s) into the location(s) at $2000.
Assume that the ATD is already powered-up (no need to enable core), that
interrupts are disabled, that timing related input to the core is correct and that the
precision is set correctly as well (i.e. 8 or 10 bits).
Hint: Can be done in 4 instructions including RTS.
pf3

Partial preview of the text

Download Embedded Systems Exam 2 - Spring 2008 - Problem Solutions and more Exams Microprocessors in PDF only on Docsity!

Student Name:______________________________ Student ID: _______________ Problem 1 Write a subroutine that will initiate an 8-bit single conversion sequence on channel 7, wait for the results to become valid (through polling) and then transfer theresult(s) into the location(s) at $2000.

Assume that the ATD is already powered-up (no need to enable core), that interrupts are disabled, that timing related input to the core is correct and that the precision is set correctly as well (i.e. 8 or 10 bits). Hint: Can be done in 4 instructions including RTS.

Student Name:_______________________________ Student ID: _______________ Problem 2

MAIN CODE ISR

rti_isr: ldaa $ coma inca

staa $3000 RTI IRQ occurs here staa $

rti

Table 1 Location Prior toCOMA in main codeAfter STAA Just Prior toRTI Just afterRTI reg A $ reg B $ reg D reg X $ reg Y $ Mem $2000 $ Mem $2001 $ Mem $3000 $ Mem $3001 $