Quote:
|
Originally Posted by Denz
I will try that. Sorry, I remember seeing that now, however in Kevin's default code it was assigned to rc_dig_in11.
|
You misunderstood the part of the code that deals with configuring quadrature encoders.
Phase A of encoder 1 has
always been documented as rc_dig_in_01, and phase A of encoder 2 has always been documented as rc_dig_in_02. The "B" phases for a quadrature encoder can be connected to any other digital inputs, but there is no phase B on a gear tooth sensor, which is why that part of the interrupt code is simply removed to handle a GTS.
Digital input 1 on the RC goes to one hardware interrupt on the PIC. Digital input 2 on the RC goes to another hardware interrupt. Changes on digital inputs 3-6 can be configured to cause a third hardware interrupt. If you want to use interrupts, you must use the input pins that support interrupts. (Now why am I suddenly having deja vu?)
Congratulations on getting it to work.