

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


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
rti_isr: ldaa $ coma inca
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 $