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?
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:
PLU Lab Guide
My primary assumption would be that if your logic design fits within the following parameters of the LPC5S6x, then you should be ok.
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.
Thanks, I will first have a look in to the rotenc example.
Retrieving data ...