riccardo
Member
Hi,
I'm getting a few glitches when I turn a pot connected to an ADC. It seems to occasionally jump to a different value. It's not electrical noise as, I have used bypass caps on the input and also checked with a scope.
I think it must be the way I am configuring the ADC, as I am shamefully not really understanding what the datasheet is telling me there.
My clock is 20MHz, I have a 1k pot between 5V and GND with the wiper pin going to the pic via a 500R resistor.
I don't really get why there is a setting for TAD and FOSC in ADCON2. If I change TAD, do I need to change FOSC too? Table 21-1 in the datasheet, makes me think I should have FOSC/16, but I'm not certain. I don't really know what to set for TAD either.
Can anyone please tell me what the setting should be or point me to a better explanation of how to do it?
I'm getting a few glitches when I turn a pot connected to an ADC. It seems to occasionally jump to a different value. It's not electrical noise as, I have used bypass caps on the input and also checked with a scope.
I think it must be the way I am configuring the ADC, as I am shamefully not really understanding what the datasheet is telling me there.
My clock is 20MHz, I have a 1k pot between 5V and GND with the wiper pin going to the pic via a 500R resistor.
I don't really get why there is a setting for TAD and FOSC in ADCON2. If I change TAD, do I need to change FOSC too? Table 21-1 in the datasheet, makes me think I should have FOSC/16, but I'm not certain. I don't really know what to set for TAD either.
Can anyone please tell me what the setting should be or point me to a better explanation of how to do it?