Ken
What kind of encoder are you using here? Usually an encoder would give out digital pulses. But, you seem to be using the ADC to decode it. I would suggest that you look at the possibility of counting the pulses via an interrupt. This will keep your mainline code free for other tasks. Darrell Taylor has some nice code that can kickstart you in that direction. Just search for it on this site.
Jerson




Bookmarks