hi
i have a TMS320vc5505 EVM and i need to use SAR ADC to convert an analog signal. I wrote below assembly code but it didn't work:
;**************************************************************************
; ADC CONFIGURATION
;**************************************************************************
MOV #0x2000, port(#SARCTRL)
MOV #800, port(#SARCLKCTRL) ;SARCLKCTRL
MOV #0x3200, port(#SARPINCTRL) ;SARPINCTRL
MOV #0x0000, port(#SARGPOCTRL)
;**************************************************************************
; PROGRAM BODY
;**************************************************************************
OR #1000000000000000b, port(#SARCTRL) ;SARCTRL start
ADC:
Wait_START_ADC:
BTST #15, port(#SARDATA), TC1
BCC Wait_START_ADC, !TC1
Wait_busy_ADC:
BTST #15, port(#SARDATA), TC1
BCC Wait_busy_ADC, TC1
MOV port(#SARDATA), T2
NOP
NOP
NOP
;**************************************************************************
I really appropriate you if you could send me assembly sample of using SAR ADC on TMS320vc5505 EVM.