As the topic says, I'm looking for some tips on ADC usage. I'm having problems with noisy or jumping readings. I've followed the base guidelines from the datasheet (18F452). I'm using a 20Mhz crystal. I am only using port A for analog so I've set the adc_ports to A_ANALOG I've set the adc clock to divide by 32. None of my imputs exceed the 10k impedance limit. I'm using the ADC_START_ONLY and ADC_READ_ONLY options with the read_adc function. I read only when the ADCON0.2 bit clears. The rest of my circuit functions well and I did not expect these inputs to be so noisy. So before redesigning the circuit I'm looking for some do's and don'ts for circuit and pcb layout. Any help would be greatly appreciated.
Bob
random_person Guest
Posted: Thu Apr 01, 2004 1:07 am
Found a link on Microchips forum website that may give you some ideas about how to improve ADC readings for PIC's in general
Well i hope i'm not insulting your ADC intelligence, but a few general tips...
1. Make sure your aquisition time is sufficiently long enough to get an accurate reading. Since you are charging / discharging capacitors, make sure they have enough time to set. Not doing so might be a cause for "jumpy" or inconsistent readings.
2. As the link suggests...perhaps you need to implement some digital filtering for the ADC pins. That would help reduce the noise.
3. If that isn't an option...you can always implement a digital filter in software if you are knowlegable about those things. Another low tech solution i've resorted to is just averaging your digital readings...essentially "filtering" out some high frequency noise but you of course lose some accuracy.
Hope this helps
random_person Guest
Posted: Thu Apr 01, 2004 1:20 am
And another thing suggested by the link...you might put some capacitor on Vcc/Vref of the PIC, which will help reduce noise on that pin in particular. I assume any noise across the Vcc/Vref pin will be reflected in your ADC readings.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum