Quote Originally Posted by Neale View Post
Not sure that it's quite that easy! If you look at the data patterns there is no simple link between either data line and direction. And if you only interrupt on one data line, you will miss half the transitions..
You configure the interrupt on either leading or trailing edge - so the interrupt occurs on a transition on one phase - the other phase is steady state at this point. The interrupt is essentially the "clock" to increment or decrement the counter. The state of the second phase, either 0 or 1 determines whether to increment or decrement.