Hi,
I am trying to scan only AN07 continously and i cannot get the result in my ADC result registers.. I checked for ATD0DR0 and ATD0DR7 as well.. both i am getting no data.. below is the initialization routine for my ATD module in s12XEG128
ATD0DIEN = 0xFF7F; // Disable digital input on AN0
ATD0CTL0 = 0x00; // Single channel
ATD0CTL1 = 0x50; // 12 bit Resolution and Cap Discharge before next sampling
ATD0CTL2 = 0x62; // Conversion will continue in Stop Mode
ATD0CTL3 = 0x8B; // Result is right justified , 1 conversion per sequence
ATD0CTL4 = 0xFF; // 1.5MHz Fatdclk and sampling at 24 ATD clock i.e. 15.36usec
ATD0CTL5 = 0x67; // Continous mode for single Channel AN7
Somebody please help me understand if I am wrong anyplace or missed out on any setting...
Solved! Go to Solution.
Write 0x27 value in ATD0CTL5 register to select AN7 channel.