Rotary Encoder for PIC using MikroC C compiler