At 11:02 AM 6/14/2005 -0500, you wrote: >If by "nonlinear", you mean that K would vary depending on the amount of the >change, then that sounds awesome here on paper. Is there a recommendation on >how to do this and derive decent initial values of K? Or am I way off track >here? No, you're not off track. You could take the reading (with minimal LPF) and compare it to the displayed variable. If the difference exceeds a threshold you preload the variable (essentially set K = 0). That way you can tolerate a very long filter time constant because it only affects the last few counts. You could try more levels than just two but it might not be necessary. As Olin points out, it's possible with any of the "non-sticky" schemes that the variable sits on the edge of a threshold long term and flickers back and forth. You can make that less likely, but it's still probably possible. If you added a smidge of stickiness you could eliminate even that, but that adds some complexity. For example, suppose for the moment you have the number y = x * 10 available and are going to display d, to approximate x /10; (d is the previous display variable). y += ((y-10*d)> 5) ? -2:+2; d = y/10; Will give you just a whisper of stickyness. Probably enough to be irritating if you're using pots to calibrate the old-fashioned and time-tested way. ;-) If you're doing calibration in EEPROM, of course, you just use the original value of y. Of course you'd probably prefer to do this in powers of two and maybe in assembly, the C code and base-10 is just for pedagogic piclist purposes. >Another thought that this brings up is that I might try changing the >*rate* of >display updates based on the amount of the change. The lower the change, the >longer the display holds before changing. This might be easy-ish to >implement by adding successive change amounts and allowing the display to >change only after the total reaches a certain value. I'll have to think >about this more. Might be the equivalent of some other schemes that have been discussed. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist