View Single Post
  #3   Spotlight this post!  
Unread 18-02-2008, 11:53
Sykan's Avatar
Sykan Sykan is offline
Lead Programmer
AKA: David
FRC #0540 (Team 540)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Virginia
Posts: 24
Sykan is on a distinguished road
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