Hello Matt, At 10:41 25/06/2002 -0500, Matt Pobursky wrote: >How is your analog ground at the PIC chip configured? Is it a >"star ground point" at the PIC AVSS pin with digital VSS ground? Ops, what is AVSS? The PIC I'm using (16F872) doesn't seem to have any pin labeled like that -- just one Vdd pin and two Vss pins that as far as I can tell are both used for logic/digital ground as well. Am I missing something? >Also, is the ground in your system (relatively) noise-free? >A small ground potential difference or ground noise can cause the >zero offsets you are seeing. Good hint, I'll look at that. >Another thing -- what are you using for your Vref? If you are >using the internal VDD, is it noisy? If you are using an external >reference you should get much better noise performance (providing >it also isn't noisy). A noisy reference which bounces around a >few bits can also cause the effects you are seeing. I'm using the internal Vdd as a reference, but can't avoid that since I need: - Three analog channels - RA5 _must_ be a digital input (since it's used as the SPI slave select line for the PIC in slave mode) So the only suitable combination is 0100 at PCFG3:0 which makes RA0, RA1, RA3 analog inputs, with RA2 and RA5 digital and uses Vdd as a reference. However I'll also check if the Vdd in general is noisy. Thanks! G. >Just some thoughts... > >Matt Pobursky >Maximum Performance Systems > >On Tue, 25 Jun 2002 10:52:17 +0200, Guillermo Rodriguez Garcia >wrote: > >Hello all, > > > >An update of this. > > >.. SNIP ... > >I modified my code and made the acquisition time much larger. > >Microchip was recommending 20 us for a non-capacitive load, > >I made it 320 us just to be on the safe side. 320 us should > >be more than enough :) > > > >The result is that the error has been reduced as I'm now > >reading $002 instead of $004 or $008 in the 'unused' channels. > >This happens on all channels that are unused, not only in the > >one that is sampled after the 'active' 4V one (see the > >original msg below for the details), so I assume that the > >acquisition is no problem anymore and that what I'm now > >seeing is only noise or something else. > > > >Question is, is it normal to have so much noise so as to > >affect 2 bits of the converted value? > > > >Any hints on how could I reduce this effect? > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu