I need help on using a rotary encoder with 16F628A. I have set the pic running with the internal oscilator on 4mhz. I have a loop constantly checking Rb1 and Rb2 for movent and i properly get the direction of the encoder. My problem is that when i turn the encoder very fast i miss some transition bits. The encoder sends 50 full pulses per rotation (200 tansitions) and it is supposed to turn with up to 300 rpm. My code needs no more that 50 cycles to check the encoder state and loop back but still it seems that i get slippage errors. Do you have any suggestions? Do you think i should use interrupts and if so how can i trap the 0 state and not only the 1?