Is it possible to use the PLU of the LPC55xx devices as quadrature encoder? I need two quadrature encoders and want to implement these by using the PLU? Is there any example available how to do this?
Hi
For those who come along here, I have created a PLU configuration which includes two quadrature decoder blocks for two rotary encoder in one PLU Setup. Setup (XML inside zip) and C file are attached.
The full project is available here:
https://github.com/olikraus/lpc804_plu/tree/master/lpc804/2x_rot_enc_with_nxp_plu_tool
The implementation is based on the state machine below. The states of the state machine had been compressed to four states so that one decoder only requires two flip flops. The attached PLU schematic includes two of these state machines to decode two rotary encoders in parallel.
Notes:
Greetings, Oliver
Hi Oliver,
Thanks, I will first have a look in to the rotenc example.
Wim
Do you want to decode a rotary encoder like described here: rotenc · olikraus/m2tklib Wiki · GitHub
The V2 state machine on the above page includes 12 states, so without further analysis I think only one decoder will fit into the PLU (because of the four FF as Sabrina mentioned).
If we would derive the KISS file description from the above state diagrams, then we could use "pluc" (pluc · olikraus/lpc804_plu Wiki · GitHub ) to generate the PLU setup code (at least for the LPC804, but I think the code should be similar for the LPC55xx).
I can derive the KISS file if you are interested.
Oliver
Hello,
The PLU allows you to create custom waveforms. However, we don't have examples that show an implementation of the quadrature encoder. The examples that we have available can be found in the following document:
Creative ways to leverage the LPC804 MCU’s integrated programmable logic feature
The above document was made for the LPC804, but the PLU feature is essentially the same.
The tool provided with our MCUXpresso IDE is the PLU tool and the step by step guide of how to use it can be downloaded:
My primary assumption would be that if your logic design fits within the following parameters of the LPC5S6x, then you should be ok.
Best Regards,
Sabina