Quote:
|
Originally Posted by Issues
Thank you for the feedback. The colored wheel illistration was helpful. I still have a question. I looked at how you set up the code and I think I get it, but what edge should be set for interupt? For the machine to keep up with the state changes wouldn't you want to interupt both when it goes from white to black and from black to white?
|
how you decode the signals will determine the resolution and max input speed of your 'speedometer'.
Note that the drawing on the other page is only a crude illustration to show how it works. Most encoder wheels have hundreds, or thousands of marks, instead of 4 or 8.
I think you can use one of the signals as a clock, and the other as the data, if you register on both edges of the clock. Using interrupts will lower your max speed reading (when the interrrupts start to overrun each other).