Forum Rule: Always post complete source code & details to reproduce any issue!
-
Calculating phase angle/shift between A & B on Teensy 4.1 Encoder inputs
I am using the hardware encoder library which is working well thus far.
I have an application that would benefit greatly from the measurement of the phase angle over time ie the phase shift between the A and B channels on the encoder input(s).
The uC reference manual does note specifically state this is possible but I am wondering if a time delta can be obtained for the difference between A and B channels and then based on the count rate this could be used to calculate the phase angle.
Has anyone done this before?
Craig
-

Originally Posted by
strud
The uC reference manual does note specifically state this is possible but I am wondering if a time delta can be obtained for the difference between A and B channels and then based on the count rate this could be used to calculate the phase angle.
Has anyone done this before?
I haven't done it before, but I noticed that in the reference manual, too, see below.
The TRIGGER input can be used
• to clear the position counters (UPOS and LPOS)
• to take a snapshot of the POS, REV, and POSD registers
• to indicate an elapsed time period, by connecting the TRIGGER input signal
to a periodic pulse generator or timer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules