How to know what period I need to sample rotary encoder?

General discussion on mikroC.
Post Reply
Author
Message
vaia-riseng
Posts: 10
Joined: 24 Oct 2011 08:36

How to know what period I need to sample rotary encoder?

#1 Post by vaia-riseng » 05 Nov 2011 15:25

Hi! I am currently trying to sample 5 rotary encoders using DSPIC30f4011. I am using timer-based interrupt for this. Whenever timer1 reaches PR1, it goes into an interrupt where the interrupt looks at the port connected to the encoders. Currently, I am trying to test it using a period of 2.5msec. But I get erroneous results. I was thinking maybe this is because I use a wrong period to sample the encoder results. So can anyone please help? Is there a reasonable computation for this sampling period?

Post Reply

Return to “mikroC General”