Quote Originally Posted by Voicecoil View Post
I seem to remember that there's a hardware solution using a couple of exclusive OR gates and a counter.....
Yes there is, and maybe a D-type flip-flop too to sense direction. (XOR gates just double the pulse rate.) But you then still need to accumulate the pulses with an up/down counter and convert the counter to analogue to emulate the pot.

If there's a C compiler for the processor I guess it should be possible to modify the library code.