Quote Originally Posted by HenrikOlsson View Post
We had a similar discussion not that long ago, might be worth revisiting.
It's important to remember that one usually want to do more than JUST keep track of an enocder and that has to be accounted for. Anyway, here's a link to that thread: http://www.picbasic.co.uk/forum/show...ght=quadrature
Thank you Hendrik.
That gave me a lot to think about.
One of the examples in that thread has the pic checking for 4 possible conditions of two bits, and remembering the last condition of those two bits.
With my experiments so far - I haven't found that to be necessary in order to maintain accuracy.

I have a pic that simulates the output of an encoder, starting with pulse periods of 15ms.
It produces 180 cycles in the CW direction - then pauses - and then produces 180 cycles in the CCW direction.

After each CW/CCW process - it starts over - but with a little shorter pulse period.
I then monitor my programs decoder output on an LCD display.
If all goes well - it starts at 0 - goes to 180 counts and then returns to 0.

I know when the processor is starting to loose track when the LCD displays bad numbers.
So far I've been able to accurately track pulse periods down to 5milli-seconds.
That may in fact be satisfactory for my usage - but I'm still playing with other options.