EmbeddedRelated.com
Forums

ADC10 With Timer A trigger

Started by glgo...@hotmail.com October 31, 2008
TACTL = TASSEL0 + MC_1 + TACLR; // ACLK, Clear TAR, Up Mode
TACCTL1 = OUTMOD_3; // Set / Reset
TACCR0 = 32-1; // 1024 samples per second
TACCR1 = 31;

ADC10AE0 |= 0x01;
ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + REF2_5V;
ADC10CTL1 = SHS_1 + CONSEQ_2;
ADC10CTL0 |= ENC
So the sampling time should be 1/1024 right? But why do i get 366 instead?

Beginning Microcontrollers with the MSP430

If i want to set it to do multiple channel sampling, do i need to increase the sampling rate?

TACTL = TASSEL0 + MC_1 + TACLR; // ACLK, Clear TAR, Up Mode
> TACCTL1 = OUTMOD_3; // Set / Reset
> TACCR0 = 32-1; // 1024 samples per second
> TACCR1 = 31;
>
> ADC10AE0 |= 0x01;
> ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + REF2_5V;
> ADC10CTL1 = SHS_1 + CONSEQ_2;
> ADC10CTL0 |= ENC
>So the sampling time should be 1/1024 right? But why do i get 366 instead?
>
>