This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28069M: Quadrature Encoder

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: C2000WARE

Dear All,

There are a list of Quadrature Encoders compatible with the Quadrature Decoder of the LAUNCHXL?

And the registers initialization programing?

Is the following Encoder compatible? Is the one turn pulse compatible?

See attached file.

Initialization code:

EQep1Regs.QDECCTL.bit.QSRC=00; // QEP quadrature count mode

EQep1Regs.QEPCTL.bit.FREE_SOFT=2; //Position counter is unaffected by emulation suspend

//
// PCRM=00 mode - QPOSCNT reset on index event
//

EQep1Regs.QEPCTL.bit.PCRM=00; //Position counter reset on an index event
EQep1Regs.QEPCTL.bit.UTE=0; // Disable eQEP unit timer
EQep1Regs.QEPCTL.bit.QCLM=0; // Latch on position counter read by CPU.
EQep1Regs.QEPCTL.bit.IEL=0b10; //Latches position counter on falling edge of the index signal
EQep1Regs.QPOSMAX=ENCODER_DIM; // the counter will be between 0 and ENCODER_DIM
EQep1Regs.QPOSINIT=ENCODER_DIM/2; // Initialize Decoder Counter to 20000/2
EQep1Regs.QEPCTL.bit.SWI=1; //Initialize position counter (QPOSCNT=QPOSINIT). This bit is not cleared automatically
DELAY_US(5000L);
EQep1Regs.QEPCTL.bit.SWI=1;
DELAY_US(5000L);
EQep1Regs.QEPCTL.bit.SWI=0;
EQep1Regs.QEPCTL.bit.QPEN=1; // eQEP position counter is enabled

Can you provide equivalents (links) that are compatible with register initialization? Or provide corrections to the above initialization?

Thanks,

Luís Gonçalves

Bei_Encoder_spec.pdf

  • Can you provide encoders equivalents (links) that are compatible and provide the registers initialization? Or provide corrections to the above initialization program with the present encoder?

  • Hi Luís,

    We don't have a list of encoders to provide. If you're using the QEP headers at the bottom of the LaunchPad board, note that the input signals are expected to be 5V and get level-shifted to 3.3V before the F2806x device.

    The encoder you linked to looks like it should work. It's 5V output and A/B channels match what the QEP module expects, see F2806x device Technical Reference Manual section for additional info.

    Your software initialization will depend on what QEP module features you want enabled and to use. QPOSMAX and QPOSINIT may have some dependence on your specific encoder (# of lines per revolution).

    You can reference the C2000WARE software example projects we have for the eQEP module initialization and usage.

    C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2806x\examples\c28\eqep_freqcal

    C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2806x\examples\c28\eqep_pos_speed

    Best,

    Kevin