|
Re: New C18 3.0+ Compatible FRC Code
I am trying to figure out the encoder code, and do not understand how the code knows what way the shaft is turning,
void Int_1_ISR(void)
{
if(ENCODER_1_PHASE_B_PIN == 0)
{
Encoder_1_Count -= ENCODER_1_TICK_DELTA;
}
else
{
Encoder_1_Count += ENCODER_1_TICK_DELTA;
}
}
What really is ENCODER_1_PHASE_B_PIN?
And what port is this interrupt running one Input 1 or 2?
Last edited by comphappy : 11-01-2008 at 01:14.
|