hello everyone!

i'm dealing with a similiar problem this weekend.

i believe that it might be better to solve some of
the functions via hardware, using one D-type flip-flop
and one AND logical gate.

if you connect A to D input of FF and B to a
raising edge clock, the output (Q) would
indicate the direction of movement, it would
be high when A goes high before B and low
when B goes high before A. output of FF would
be connected to B.3 (i want to use 16f628 with
B.1 and B.2 as hardware UART).

then i'd lead A and B through AND gate and connect
its output to B.0/INT (interrupts enabled)

counter would then be changed (incremented
or decremented, according to B.3) whenever
INT occours.

ICE, can you please please send me complete
working code in PBP?