> -----Original Message----- > From: Eric Strauts [SMTP:strauts@DSL.TELOCITY.COM] > Sent: Friday, December 08, 2000 1:31 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]:16F877 A/D converter noise > > I am using the 10-bit A/D converter in the PIC16F877 to digitize 2 > signals at a rate of 2000 samples per second for display on an LCD > screen. I seem to always have about 10 counts of noise even > when I put a large capacitor bypassing the RA0 and RA1 input pins > to ground. > > I am using a 16 mHz clock frequency that I can't reduce. > > I think I am following the datasheet recommendations: > > tad=32Tosc > low impedance drive from an op-amp > wait 20uS between reading RA0 and RA1 > .1 uF bypass caps near the chip power pins. > LM336 - 2.5 volt reference on RA3 bypassed with 10uF > software is written in CCS-C and uses the built in read_adc() > function > > Is there some secret to getting true 10-bit accuracy. I don't even > have 8-bit now. > Just implemented some ADC code on a project and tested it today. I am using Vcc and 0v as the references and I'm getting a rock solid reading, only getting jitter on the LSB when it approaches it's switching point. This is using a 20 MHz crystal, but this is on a PCB we nice power and ground planes and I'm only using one channel at a low sampling rate (20 samples/sec). I would check the supply to your PIC, both Vcc and ground and make sure they are as quiet as possible. The ground pin of your reference should be connected as closely as possible to the ground on the PIC. Regards Mike -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads