Quadrature Encoder Iinterface (QEI) od PIC

Thread Starter

dmta

Joined Mar 24, 2013
32
Hi all,

Does anyone have an application note or a sample code on how to configure and read speed/position from the QEI module in PIC 18FXX31????????

Regards
 

WBahn

Joined Mar 31, 2012
30,058
Just sketch out the relationships of the two inputs and you'll see that you have a very simple state machine. You have four states and depending on which input changes you can transition from any state to one of two of the other three states. Depending on the transition, you either count up or count down. Your count gives you position and the rate at which you are counting gives you the speed.
 

WBahn

Joined Mar 31, 2012
30,058
Or, you could try Googling something like, say: PIC QEI module

The first thing that comes up is a PDF file from Microchip titled, "Measuring Speed and Position with the QEI Module"

Seems like that might be worth looking at.

Wonderful thing, this Google. Perhaps it will catch on someday.
 
Top