>I want the 'hot' limit to be changable; maybe 200..250 dont know values >until tested. Same for 'cold' limit, 0..50 perhaps.So <128 is a bit coarse. Well, whatever you want it to be; I just gave 128 as an example. You could use a filtering method to achieve a running average. If you wanted to take an average over a multiple of 256 points, I think that's easy, if I remember correctly. There is a 256-bit filtering method on the PICLIST archives; I think it's only ~12 instructions. You could keep result (majority 1 or 0) in another register. >I figured I need 32bit math so it wont overflow... from all the polls. >It will be alot of 32bit add/subtract/compares. Hot/cold limits, max value, >leds etc >I want a linear indication of the level, preferably in the range of 0-255. >Since the current measured level is to be shown on 5 LEDs always. Very >pretty ;) >0-50 LED1 >50-100 LED2 >100-150 LED3 >150-200 LED4 >200-250 LED5 As long as your inputs are reliable enough to use this sort of resolution, you'll be fine. Of course, consider this: 11111101111111011111101111.... would be LED5, *unless* you only polled during the '0' output due to your polling only every 1024 pulses. or 0000000100000100000010000.... you get the idea. --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.