Fast Quadrature Decode TPU Function (FQD) PROGRAMMING NOTE

2021-11-24
●The fast quadrature decode function is a TPU input function that uses two channels to decode a pair of out-of-phase signals in order to increment or decrement a (position) counter. It is particularly useful for decoding position and direction information from a slotted encoder in motion control systems, thus re-placing expensive external solutions. Figure 1 shows a typical application.
●The FQD function uses a pair of adjacent TPU channels to decode quadrature signals into a 16-bit counter in parameter RAM (PRAM). The counter is updated when a valid transition is detected on either one of the two inputs — full ‘4x’ resolution is derived from the encoder signals. The counter is incremented or decremented depending on the lead/lag relationship of the two signals at the time of servicing the transition. The user can read or write the counter at any time. The counter is free running, overflowing to $0000 or underflowing to $FFFF depending on direction.
In systems where the counter may overflow or underflow, the user must ensure that the CPU reads the counter periodically.Maximum period is $8000 counts at maximum signal frequency. Two’s complement arithmetic can then be used by the CPU to maintain position and direction information.
When initialized, the FQD function is configured so that the first edge on either channel results in a counter update.
Since the two FQD channels, which must always be adjacent, operate differently, this note uses the convention of referring to the channel with the lower channel number as the primary channel. The other channel is referred to as the secondary channel.
The FQD function differs from the QDEC function in having both normal and fast modes of operation.
In operation, the CPU dynamically switches the FQD function between modes depending on the current encoder speed.

NXP

More

More

User's Guide

More

More

Please see the document for details

More

More

English Chinese Chinese and English Japanese

2004

524 KB

- The full preview is over. If you want to read the whole 20 page document,please Sign in/Register -
  • +1 Like
  • Add to Favorites

Recommend

All reproduced articles on this site are for the purpose of conveying more information and clearly indicate the source. If media or individuals who do not want to be reproduced can contact us, which will be deleted.

Contact Us

Email: