Reading an encoder using counters or TV hardware?
Graham Stabler
Posts: 2,510
I am sure I remember someone came up with a super clever way of reading quadrature encoders at lightning speed using either counters or the TV hardware but I can't remember any other details, am I imagining this?
Cheers,
Graham
Cheers,
Graham
Comments
How fast are are the pulses that you need to decode and count?
-Phil
I wrote code in assembly for tracking a single encoder which is about as fast as can be coded I think (uses a look up table stored in a single long and some shifting) and could extend this but I just remember that someone posted something really clever that I think could track several encoders at a very high frequency. Can't believe I have lost it.
Graham
p.s. my code which was someone else's idea implemented by me is here:
http://forums.parallax.com/showthread.php?p=617168
It does a single encoder at 1.3Mhz including write to hub memory.
Post Edited (Graham Stabler) : 8/4/2009 11:22:01 PM GMT
What is bugging me is that I am sure I read about some clever method for doing it with counters or something and I am starting to think I am going mad. Particularly as I was sure Phil wrote it and even emailed him.
Graham
You may be thinking of this thread: http://forums.parallax.com/showthread.php?p=742749. It uses the counters to generate quadrature output.
-Phil