|
Re: Interrupt Trouble
The Encoders are connected to Port 1 and 2 of digital input.
i'm Using Kevins Code with Mplab
Sense i'm using the KOP Encoder i've changed the Interrupt handler to
if (pwm16 >= 127){
Encoder_1_Count += ENCODER_1_TICK_DELTA;
}
else {
Encoder_1_Count -= ENCODER_1_TICK_DELTA;
}
for both oh/course with the correct corresponding Motor and Encoder Count.
i've Enabled the Int in the ifi_frc.h, the Encoder.h and the Initialize_Encoder_1(); in the teleop.c
I haven't Changed anything else
|