I have made the following program:
INCLUDE "modedefs.bas"

TRISB=%11111111
TRISC=%00001010

W1 VAR WORD
W2 VAR WORD
loop:
Count PORTB.7,3000,W1
Count PORTB.6,3000,W2

SerOut2 PORTC.0,84,["TIMES COUNTSa:",DEC W1,13,10]
SerOut2 PORTC.0,84,["TIMES COUNTSb:",DEC W2,13,10]

GoTo loop
In pins B.7 and B.6 i have connected the 2 channels of an incremental quadrate encoder.The problem is that channel A(PortB.7) shows the right pulses but channel B(PortB.6) shows always 0 !I am sure that i have made the right connections .Do you know what goes wrong?

Thank you in advance.Don't hesitate to answer me.I am desperate!