Dario Greggio wrote: > Now I'm wondering how can I save some cycles, i.e. I need one readout > out of 1-2 seconds, so am wondering if I still have to sample every > 1mS and do the math for IIR and peak-detect every time... You do if you want good noise immunity. Take a look at the cycles though. Compared to a 24F at anything near full speed, the cycles used by this is a tiny fraction. Let's say for example the PIC is running at 30MHz instruction rate. That's 30K instructions per 1mS sample. 1% of that would be 300 instruction, which is way more than the filtering and peak detection would take. Are you really so tight on CPU cycles that a fraction of 1% makes a difference? ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist