View Single Post
  #7   Spotlight this post!  
Unread 02-02-2004, 22:35
kc8nod's Avatar
kc8nod kc8nod is offline
Registered User
AKA: Ted Hansen
FRC #1216 (Knights)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Oak Park Michigan
Posts: 43
kc8nod is on a distinguished road
Re: Problems counting encoder pulses

Even if your code is running in user_routines_fast.c you can still miss pulses. Remember that everything comes to a screeching halt when it is time to run the Process_Data_From_Master_uP(). The most reliable way to count pulses is with an interrupt-driven routine. Perhaps you could look at Kevin Watson's example code at http://www.kevin.org/frc/
But if you really are turning the shaft very slowly (much greater than 26ms between pulses) it sound like you've got some other bug.
Why not post the code here?