On Tuesday 14 June 2005 11:29 am, Scott Dattalo scribbled: > Neil, > > Here's a 2-sample hysteresis filter: > > current_sample = filtered_data(); > > if ( (current_sample == last_sample) || > (abs(current_sample - displayed_sample) > THRESHOLD)) > displayed_sample = current_sample; > > last_sample = current_sample; > > This cuts the flicker rate in half. To reduce it more, you can increase > the number of required consecutive samples from 2 to N and save the last > N-1 samples in an array. That's pretty much what I'm doing now (except in assembly), except that it seems in this case, a change of <= THRESHOLD which never get updated on the display no matter how long that value holds. Cheers, -Neil. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist