View Single Post
  #5   Spotlight this post!  
Unread 06-10-2008, 10:04
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Encoder Oscillation Issues

Quote:
Originally Posted by 1jbinder View Post
We modified the ISR's of both encoder five and six to be the same as three and four.
First, I assume you mean "similar to", not exactly "the same as", right? Each encoder's pin assignment and state variable is separate from the others'.

Second, they don't actually look very similar to me. The ISRs for encoders 3 and 4 lack any code to do counting for a falling-edge interrupt. The ISRs for encoders 5 and 6 do have the code, though it is commented out -- but it is commented out differently in each routine. It looks like you might have copied and pasted the routines from a different file, then made changes, but didn't do it consistently. The differences don't appear to be relevant to the compiler, but it's hard to be certain.

Finally, you need to show how the ISRs are being called. Post the actual interrupt service routine from user_routines_fast.c so we can have a little more context.