|
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.
|