View Single Post
  #5   Spotlight this post!  
Unread 02-02-2004, 21:50
velocipenguin velocipenguin is offline
Registered User
#0246 (Overclocked)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Boston, MA
Posts: 77
velocipenguin is on a distinguished road
Send a message via AIM to velocipenguin
Re: Problems counting encoder pulses

You might want to consider using an external counting circuit to count pulses and store them in some sort of register that can be read by the RC at any time. Before doing that, however, I would recommend modifying your code so that it uses interrupts to count pulses - this would eliminate any problems caused by the fairly low sample rate imposed by the rate at which the main loop executes.