Part Number: AMIC120
Hello,
I would like to acquire position data from an incremental encoder with the following protocol, but it seems that eQEP can not cope with it.
Are there any good solutions?
Regards,
U-SK
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.
Hi,
As you mentioned, this is not the ideal input into the eQEP peripheral. From the TRM section 20.4.2.1 there are two modes that the eQEP can support:
Unfortunately, it doesn't appear that a single eQEP can support the protocol that you have pictured.
However, looking at the functional block diagram of the decoder unit (Figure 20-134 in section 20.4.2.3 of the TRM) it appears that you can tie the internal QDIR signal to either a 1 or 0 (forward or reverse) using the QDECCTRL:QSRC mux selection register. So, one solution might be to use two eQEP peripherals with one QDIR tied to 0 and one QDIR tied to 1 and provide your two signals to the EQEPxAIN signal of the two separate eQEPs. Then it may be possible to use the Direction-count Mode mentioned above to keep a count of each of the signals separately in the two eQEPs and use software to determine the position or count by summing or comparing the two values.
A second solution could be to use an AND gate to tie the two signals together into one combined signals that represents both forward and reverse. This could again be provided to the eQEP in Direction-count Mode as the clock signal. A PRU core could be used monitor the two signals (before the AND gate) and either provide a 0 or 1 signal into the direction pin of the eQEP based on which signal (A or B) was logic low most recently. Depending on the speed of the pulses the PRU core may not be able to keep up and a hardware solution would need to be used to determine the most recent logic low between the two signals.
Jason Reeder