I'm using a LM34 I have set the VRef+ to 2.55 volts but I get 5% jitter. I'm using a median average that takes 64 ADC samples and returns the median average .
What's the cause of the jitter? It should not be more than a couple of mV, and with Vref = 2.55v you have about 2.5mV per ADC count, so your jitter should not be more than 1 or 2 ADC counts.
Did you put a decent sized cap on the ADC input close to the PIC pin? A 10uF tantalum is fine and will remove the majority of the low energy noise component. If the sensor is remote and getting a lot of noise you can add a resistor before the cap to give an RC filter, on something as slow as a temp sensor the have the advantage of being able to use a lot of filtering.
If you are getting mains freq noise a good technique is to read X samples over a full mains exact period, and then average them. With 60Hz mains that means X samples over 16.667mS (or a multiple thereof).
I'm thinking the power supply I used a voltage divider to set the 2.55 and 8 bit ADC
I was thinking maybe a bigger cap from output to ground I have a .1 uf from ground to VDD and a 1uf ground to output maybe a 10 uf and a 75 ohm resistor would make this more stable
I've just been doing something similar with an 'f88, I couldnt see where the noise was comming from on the 'scope, a couple of 47u electrolytics on the a/d inputs sorted it.
This kind of problem gets worse as the source impedance increases, if your source is>10k then you might have to use an op amp follower.
Oversampling as the OP did is a decent way to handle true noise. For samples that I need to accurately tack over time, a moving average of 8, 16, 32,or 64 samples is useful and easy to divide.
While of course you are quite correct, us engineers will go to silly lengths to remove any components from a circuit, I sometimes wonder why they dont do an lcd with a pic micro controller that you can use to control other things as well, then you just strap an lcd on and away it goes.
I'm using a LM34 I have set the VRef+ to 2.55 volts but I get 5% jitter. I'm using a median average that takes 64 ADC samples and returns the median average .
To get stable ADC readings you need a stable VREF . Try something like MCP1525 to generate a precise 2.5 V reference for A/D conversion and see how it goes ...
While of course you are quite correct, us engineers will go to silly lengths to remove any components from a circuit, I sometimes wonder why they dont do an lcd with a pic micro controller that you can use to control other things as well, then you just strap an lcd on and away it goes.
microchip has come close to this. They have a few PICs that have the LCD driver on the chip. Just hook it to some LCD glass (lcd no controller) and bob's your uncle. The drawback is it takes a lot of pins to drive LCD glass so these then to be SMD parts.
Interesting, I'll look at that.
Makes sense though you see plenty of commercial stuff such as car radios where the lcd is connected directly to the micro, from what I know dc is bad for lcd's
There are a few projects where people use a normal micro PIC AVR etc to drive a LCD with the required AC. The difficult part is getting enough pins and that some LCDs require a low voltage, so you have to run a low Vdd or some way to reduce pin voltages.
I had some LCD that had pins like a wide P dip they only did numbers like a seven segment. Cant remember there name. But any 40 pin chip could easily drive one. Mark used them. I found a pic
i have used an lcd, way back, it was a 7000 or something like that series chip which was a freq counter with a built in lcd driver.
The data sheet banged on about ensuring there was absolutely no dc on the display otherwise it souldnt last long.
As I understand it ac squarewave is applied to the backplane and ac is applied to the segments, in phase for segment on, out of phase for segment off.
Well which ADC are we talking about anyway? PICs? Anyway I wrote a blog about ADCs (if it is related) it in our dear ETO, you can take a look into it and comment.