
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!

Instructions:
Problems:
a. 8-bit ADC, sensor range [-20 80], sensor reading 50 $B
b. 10-bit ADC, sensor range [-20 80], sensor reading 50 $2CC
BSET ATD0CTL2 , #% BSET ATD0CTL3 , #% BCLR ATD0CTL4 , #% MOVB # 5 , ATD0CTL BRCLR ATD0STAT0 , #$80 ,* LDD ADR00H STD SENSOR_READING
ORG $
MOVW #$3020 , $3E4A ; Initialize interrupt vector BSET TSCR1 , # %10000000 ; Timer enable BSET MCCTL , #%11000111 ; Interrupt enable, Restart the counter ; Modulus enable, scaling down by 16 MOVW #48000 , MCCNT ; CLI BRA * RTS
BSET MCFLG , #%10000000 ; Clear the flag CLI RTI