The most efficient method for an encoder that I've encountered is a "current state/next state" combination of 4 bits that you can use for a lookup function. The result of the lookup defines the action, where a result of 1 could be "increment", 2 could be "decrement", 0 could be "do nothing/not valid". Super slick, minimal code space. Don't forget to allow for debouncing.
Bookmarks