John Sanderson wrote: > How to improve the resolution of a PIC 8-bit adc? > If you can afford the processing time (many jobs can), you could > read the port 256 times and summate the adc 8bit result each time > to a 16bit file register pair. > .. > Then just throw away the lowest 4 bits, leaving you with a 12bit > result. > .. > Of course, this doesn't get around the 8bit quantising of the adc, > but if there is a *little* noise inherent in your measurement, you > can end up with a genuinely higher resolution. There's a little more to take into account - it's not as easy as sampling 2^n times to increase the resolution by n bits. First, you have to know the "noise-free" counts of your system. This is typically your full scale signal divided by 6 times the rms noise - you find the rms noise by calculating the standard deviation of a sample set (I use a minimum of 1000 sample points). Of course, this is only valid if your noise is Gaussian - plot your sample set to see. Where did that "abritrary" value of 6 times come in? If your data plot indicates that your noise is Gaussian, one standard deviation is equivalent to the rms noise. Almost all of the data points will fall within +/-3.3 standard deviations - use a factor of 6 (close enough to 6.6) to estimate the peak-to-peak noise relationship to the rms noise. NOW, you can use averaging to improve system resolution. BTW, thermal noise is typically the only true Gaussian noise that you're going to find. --Matt