Other Parts Discussed in Thread: CC3200
Hello,
I have configured the ADC with channels CH1, CH2 and CH3 and with an interrupt every 10ms to read the value of each of them and save it in a buffer.
When I have 1000 readings for each channel, I export the values to display them graphically. The three channels are on the air without any connection, that is, they capture noise.
I have observed that CH1 has a lower average value than CH2 and CH3, around 850. In addition, peaks of 1400 values appear randomly in CH1 when they do not appear in CH2 and CH3.
I have checked the configuration and everything seems to be correct. What can these peaks be due to??
Configuration:
ADCChannelEnable(ADC_BASE, ADC_CH_1);
ADCChannelEnable(ADC_BASE, ADC_CH_2);
ADCChannelEnable(ADC_BASE, ADC_CH_3);
// Enable ADC module
ADCEnable(ADC_BASE);
Code of interrupt:
if (ADCFIFOLvlGet(ADC_BASE, ADC_CH_1))
bufferSamples[countsample].C1 = (((unsigned short) ADCFIFORead(ADC_BASE, ADC_CH_1) >> 2 ) & 0x0FFF);
if (ADCFIFOLvlGet(ADC_BASE, ADC_CH_2))
bufferSamples[countsample].C2 = (((unsigned short) ADCFIFORead(ADC_BASE, ADC_CH_2) >> 2 ) & 0x0FFF);
if (ADCFIFOLvlGet(ADC_BASE, ADC_CH_3))
bufferSamples[countsample].C3 = (((unsigned short) ADCFIFORead(ADC_BASE, ADC_CH_3) >> 2 ) & 0x0FFF);
Thanks.