View Single Post
  #9   Spotlight this post!  
Unread 11-02-2008, 13:08
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: KOP Gear Tooth Encoder Trouble

Quote:
Originally Posted by Sykan View Post
...and a pwm connected to the Rc digital input 11.
This at least one of your problems. You should be using the phase a input on digital input 1. Then make sure to modify the encoder.c/Int_1_ISR() function to look like this:

Code:
void Int_1_ISR(void)
{
    Encoder_1_Count += ENCODER_1_TICK_DELTA;
}
-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org