Quote:
|
Originally Posted by dmurdz
What do you mean " phase-A signals must be tied to an interrupt", can i hook them up to digital i/o pins 3-6???
|
One of the two phases of the encoder needs to be able to interrupt the processor. Putting it on pin 1 or pin 2 makes that easy, with each pin causing its own interrupt upon the desired edge of the connected signal. Using pins 3-6 complicates the software quite a bit, because those pins all cause the same physical interrupt no matter which pin changed, and no matter which direction the signal transition went. You can still do it (in fact, you
have to do it if you're using more than two encoders), but you need to know which bits of PortB mean what, and you need to do your own software filtering of signal transition direction. It takes a lot more work to do it that way rather than letting the RC hardware do it for you.