#include "msp430fr2355.h"
;-------------------------------------------------------------------------------
ORG 08000h ; Program Reset
;-------------------------------------------------------------------------------
RESET mov #03000h,SP ; Initialize stackpointer
mov #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
call #SetupA2D
Loop
call #ReadA2D
jmp Loop
;-------------------------------------------------------------------------------
ReadA2D
bic #ADCIFG0,&ADCIFG
bis #ADCON+ADCENC+ADCSC,&ADCCTL0
A2DLoop
bit #ADCIFG0,&ADCIFG
jz A2DLoop
bic #ADCENC+ADCSC,&ADCCTL0
ret
nop
;-------------------------------------------------------------------------------
SetupA2D
; 8 S/H clock cycles
mov #ADCSHT_1+ADCON,&ADCCTL0
mov #ADCSHP,&ADCCTL1
mov #ADCRES_2,&ADCCTL2
ret
;-------------------------------------------------------------------------------
ORG 0FFFEh
DW RESET
END
When I execute the instruction in Line 16 of the code (single stepping through the code) the ADCSC bit never turns on. It stays at 0.