Kevin wrote: > I was kind of looking for a real world example. What should > my sampling rate be ? I only need to xmit a new temp and RH > every minute or so. I may add a Pressure sensor later. But, > besides sending the new reading to a PC the pic does nothing > else. > What sampling rate would you use ? The point was for you to understand what is going on enough to answer this question yourself. But OK, here's a dumb answer. Use timer 2 to set up a periodic 1mS interrupt. In the interrupt, start a A/D conversion. In the A/D conversion done interrupt, save the A/D reading and switch to the next channel. For each channel do a 2-pole low pass filter with 8 shift bits (FF = 1/256 in the equation I have posted here regularly). 8 is a nice number since doing a "shift" by 8 only requires picking off the right bytes. A 2 pole low pass filter with 8 shift bits per pole has a 90% settling time in about 1000 iterations. Since you are taking 1 reading each mS and there are 2 channels, this means each channel gets 500 iterations/second. Each reading therefore will settle to 90% in 2 seconds. That is much faster than you need, but is convenient to do and gives you quite a bit of random noise attenuation. You could use 10 or 20 mS for the interrupt period without changing anything else and the filtering would still work fine within the spec you gave. I said 1mS because you asked for a hard answer and that is often a useful value for other system timing and timer 2 can't go all that long, at least not at 20MHz oscillator. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist