|
Re: Should I use a Pot or an encoder, and how?
Quote:
|
Originally Posted by bear24rw
I think that you need to use interups... that way the refresh rate of your user_routines wont matter...
|
An alternate method would be to use a hardware counter. Have the counter count the encoder ticks, then read them whenever you're ready. That way, timing doesn't matter at all. Well, I guess if you're trying to figure out speed you'd need to know the amount of time between reads...
__________________
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
|