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.

TM4C123GH6PM: rotary encoder

Part Number: TM4C123GH6PM

Hello, 

     I am attempting to use the QEI module to interface with a rotary encoder ( with pushbutton) that I want to use as an input device to  a small embedded project. much like a volume knob on a car radio but the rotation would be used to increment and decremnt an on screen menu and the pushbutton would indicate the selection. My initial run at this is noisy and I can deal with that. but i do have a couple questions. 

the part in question at digi key.

ACZ11BR1E-20KQD1-20C

Is this a good fit? this device  and the QEI module. seems made to order. 

why the lack of example code for the QEI module. Surprisingly few examples from TI . Noticed github is also pretty bare of such examples.

Part of why I am questioning the design path.

Thanks

Pat

  • Hi,

      Per datasheet, the input frequency of the QEI inputs may be as high as 1/4 of the processor frequency (for example, 20Mhz for a 80Mhz system). I don't think there will be issues to support your choice of input device. 

      Although we don't have a QEI example, I find this website talk about using Tiva for QEI project with example code. I hope it will be useful to you.

    https://hum60hz.wordpress.com/2015/11/07/quadrature-encoder-interface-tiva-c-launchpad/

  • thanks for the response. I am struggling with the counter a bit. maybe you have some suggestions. When i click the knob one "click" or detent I get a random increase (or decrease) in the position register. anywhere from 3 to 11 up/dwn in the position.I have a low pass filter on the inputs and the digital filter set to its max in the qei module. I was hoping to get a change of one for each "click" on the encoder. 

    I dont have any of the velocity items in use. Is there something I'm missing? I have it debounced as much as I can. 

  • Hello Patrick,

    Correct that there wouldn't be a velocity element in play for this sensor. It would be only positional. I would recommend reviewing the datasheet setup instructions versus the datasheet of your encoder and then verify your TivaWare APIs are correctly configuring the peripheral. I don't see any reason on the surface why that part wouldn't work with the QEI module.

    Best Regards,

    Ralph Jacobi