This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello everybody, I was looking for an example of code to an analog read in Repeat-Sequence-of-Channels mode with the ADC10 without using CPU resources.
I think that I can understand the functioning of ADC10 module but I need an example of code to use correctly the module.
actually I did the following code to read an analog value:
int ADC;
void read_Ax(void)
{
ADC10CTL1 = INCH_x;
ADC10CTL0 = ADC10ON;
ADC10CTL0 |= ENC + ADC10SC;
_delay_cycles(10000);
ADC10CTL0 &= ~ENC;
ADC10CTL0 &= ~(ADC10ON);
ADC = ADC10MEM;
}
Of course Ax most be A0, A1, A2,.. and de code it's just an void function.
the code it works but I need to do the same for 4 analog inputs without using CPU resources. I know that It can be done with the Data Transfer Controller DTC but I need an example.
please I need an example code
Hi Manuel!
Did you have a look at the code examples already? There are:
One explains repeated conversions and the other how to sample a sequence.
Dennis
**Attention** This is a public forum