TS-7180 Quadrature: Difference between revisions

From embeddedTS Manuals
(Created page with "The TS-7180 provides three independent quadrature counters. The associated inputs are shown in the table below. {| | colspan=2 | |- | {| class="wikitable" |+ Quadrature |- ...")
 
mNo edit summary
Line 1: Line 1:
== Quadrature Counters ==
The TS-7180 provides three independent quadrature counters.  The associated inputs are shown in the table below.
The TS-7180 provides three independent quadrature counters.  The associated inputs are shown in the table below.


Line 24: Line 26:


Each of the quadrature counters (which are in the FPGA) is 16-bits wide, and are accessed via i2c.  The addresses are shown below.
Each of the quadrature counters (which are in the FPGA) is 16-bits wide, and are accessed via i2c.  The addresses are shown below.




Line 58: Line 61:


The MSB aliases are used to detect 16-bit rollover.  If the first reading of the MSB is not equal to the second, overflow/underflow was detected during the read.
The MSB aliases are used to detect 16-bit rollover.  If the first reading of the MSB is not equal to the second, overflow/underflow was detected during the read.
== Edge-Counters, Period-counters ==
For each input pin, there is an edge-counter, and a period-counter.  The former counts the positive edges on an input pin, while the latter may be used to measure the elapsed time between N positive-edges.

Revision as of 14:40, 6 June 2018

Quadrature Counters

The TS-7180 provides three independent quadrature counters. The associated inputs are shown in the table below.

Quadrature
Quad # INPUTS
Quad0 DIG_IN_1 + DIG_IN_2
Quad1 DIG_IN_3 + DIG_IN_4
Quad2 DIO_6_IN + DIO_7_IN


Each of the quadrature counters (which are in the FPGA) is 16-bits wide, and are accessed via i2c. The addresses are shown below.


Quad # MSB LSB MSB Alias
Quad0 96 97 98
Quad1 99 100 101
Quad2 102 103 104


For example, to read the MSB for Quad1:

tshwctl -r -a 99


The MSB aliases are used to detect 16-bit rollover. If the first reading of the MSB is not equal to the second, overflow/underflow was detected during the read.


Edge-Counters, Period-counters

For each input pin, there is an edge-counter, and a period-counter. The former counts the positive edges on an input pin, while the latter may be used to measure the elapsed time between N positive-edges.