Question about Encoders

Can someone explain me how to use Binary encoders which has one signal?
I use MPLAB with kevin`s code.
Thanks :rolleyes:

you can put the output of a single signal on either the 1-2 dig_io (Encoder1 and Encoder2 in Kevin’s code) in which case you will treat them just like gear tooth counters, or, to reduce interrupts, use the 3-4 dig_io (Encoder3 and Encoder4)
and tie the corresponding phase B either high or low so you always get + counts. (Always having + counts lets you use unsigned long int to double your counts before reset).
Make sure you enable the interrupts and the encoders at the top of your code following Kevin’s readme and remember the output is a long!

I never have tried to use the rising edge detection to determine direction from a single output encoder or gear tooth counter.

I hope this is still of any value to you. Sorry for not getting this sooner.