Quote:
|
Originally Posted by kiettyyyy
Ohh I see.. So if I wanted to have Encoder1 on digital i/o #1 and #2, and Encoder2 on digital i/o #3 and #4...
|
You don't want to use those inputs that way. It'll make the interrupt routine a lot more complicated than it needs to be.
Digital inputs 1 and 2 are the "natural" ones to use for Phase A of a pair of encoders. They can be set to cause separate interrupts on either a low-to-high or high-to-low transition of the signal. Inputs 3-6 are able to cause interrupts as well, but they all share the same interrupt bit in the processor, and they will trigger the interrupt on both rising and falling edges. The Phase B lines don't need to be connected to interrupt-capable inputs, and should generally go to input 7 or higher.