Hi all, I did the measure time between pulses approach for a project=20 that needed fine user control on 1K steps of PWM for LEDs. It worked=20 but was a little finnicky, some further refinement that wasn't worth the=20 time probably would have improved things. So turning the knob slowly stepped by 1, and fast did bigger (10s or=20 more) jumps. I suggest having it be that you need to see more than 1 step in the=20 reverse direction before changing the step speed/direction. Part of the=20 nuisance is the need to debounce the encoder signals while also=20 responding to fast moving changes. Also if you're stepping by 100s, for=20 example, and see a reverse, maybe it should reverse by 100 and not 1s,=20 unless a half second or more has elapsed since the last step by 100.=20 Lots of room for timing constants and tweaks here. The timer setting on my (guess) early 1990s oven takes this approach,=20 setting single seconds vs. 15 second jumps vs. minute jumps vs 5 minute=20 jumps, and when reversing direction it does the reverse jump by the same=20 amount as forward, and has a short (200msec?) timeout whereby no change=20 =3D go back to single seconds. All this works better than the thing I=20 made (which has no readout to help tell the user what's going on). Just my 2c. J Kerry wrote: > One way I have thought about (but have not tried yet) is to use a > mechanical encoder. > Step by 1s. If you see 10 steps in the same direction, start stepping > by 10s. > If you see 10 steps of 10 in the same direction, start stepping by 100s. > If you see 10 steps of 100 in the same direction, start stepping by 1000s= .. > If you see a step in the opposite direction, go back to stepping by 1s. > I don't know if this would be more of a PITA than it's worth. > An alternative would be to measure the time between encoder pulses, and > take bigger steps for quicker pulses. > > Kerry > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .