All, Responses in-line below... --- In , Robert Rolf <robert.rolf@u...> wrote: > Leon Heller wrote: > > > >>All good advice, guys. I've tried the low pass idea, that had > >>little to no effect. I've not tried the dummy load. This latter > >>could be most enlightening since I am indeed running on a solderless > >>breadboard for this initial circuit. > > > > > > That's the cause of your problem. You won't get the ADC working properly > > without a properly > > designed PCB. > > Really?? I started my project with a 16F73 ADC on a breadboard, > and it worked fine. Moved up to a 16F876 and got 10 bits, rock solid. Me too here - care in layout is essential. This is a pretty low frequency setup and noise, except for motor noise, is minimal. I've been working with motors and PICs for a long time and understand that dynamic pretty well. Although this is a new app for me. > And there is lots of stuff going on (10khz interrupts, > Mhz SPI and khz PWM. The key is making sure that your bypass caps > are where they need to be and that you avoid ground loops. > I do use the power and ground busses on the breadboards, but > made sure to arrange the chips to put the 'quiet' stuff on > one size, the noisy stuff on the other, and feed power into > the center. This is what I did - in any application I make sure that the CPU has a single point power entry that is heavily "guarded" whether on the final design or on a solderless breadboard. > I'd suggest that he has a firmware timing problem and is reading > the ADC before conversion is complete. If he were to feed it > a fast triangle wave he would see if his convertor is uniformly > sampling since the delta between samples should be the same > for all points except the peak. I think that you are correct here. I put a "monitor" on my readings and just let the thing sit there, doing nothing - Every so ofter, but pretty regularly, I got a "glitch" in the ADC readings when there should be nothing there at all. This is a ghost reading, there is no noise in the system since nothing but the processor was running. I'm using CCS PCM C compiler for this project and haven't looked to see how they implemented their setup. All I get is this sequence of functions: setup_adc(ADC_CLOCK_DIV_32); what this does is obvious setup_adc+ports(RA0_RA1_RA3_ANALOG); again, this is obvious ... set_adc_channel(0); delay_us(90); Calculated Tacq is 87us ma = read_adc(ADC_START_AND_READ); I'm thinking that the following sequence might be better: setup_yada_yada... ... read_adc(START_ONLY) to get it into free run mode set_adc(0); delay_us(90); ma = read_adc(READ_ONLY); This latter might give me what I need to get a proper reading with correct timing. I've not yet examined the ASM output to see what code they are generating, that might shed more light too. regards, DLC > > Robert |