Hi,
I have CC2541 ADC channel P0.5 connected to an LM358 opamp output.
The ADC sampling rate is 1 sample/sec, Vref is AVDD, resolution 10 bit, Vcc is 3V.
The opamp generates a constant voltage of approximately 12mV. I am using HAL adc functions to read the ADC data by editing SimpleBLEPeripheral.
I am sending the ADC data to my PC using CC2541's UART and see the data using CoolTerm.
For 12mV opamp output, I am supposed to get an ADC data of (1023/3)*.012 = 4.
However, I see that the ADC data is varying from 0 to 6. (which is approximately from 0v to 17mV)
Interestingly, I have also sampled the same op-amp output using an Arduino with similar ADC configuration. Here, the ADC data did not vary too much.
It varied from 3 to 4 (which is approximately from 8mV to 12mV).
Is there a way I can reduce the ADC data variation in CC2541?
I tried to solve the problem by connecting a 1uF decoupling capacitor from P0.5 to GND, however, I do not see any improvement.
Any suggestions?
Thanks.
Tareq