TMC5160 DATASHEET (Rev. 1.08 / 2018-NOV-19)
107
-
Decimal mode encoder factor -25.6: 0xFFE6.4000 = 0xFFE6.0x0FAO. This equals (2^16-
(FACTOR+1)).(10000-DECIMALS)
THE ENCODER COUNTER X_ENC
The encoder counter X_ENC holds the current encoder position ready for read out. Different modes
concerning handling of the signals A, B, and N take into account active low and active high signals
found with different types of encoders. For more details please refer to the register mapping in
section 6.4.
THE REGISTER ENC_STATUS
The register ENC_STATUS holds the status concerning the event of an encoder clear upon an N
channel signals. The register ENC_LATCH stores the actual encoder position on an N signal event.
20.1 Encoder Timing
The encoder inputs use analog and digital filtering to ensure reliable operation even with increased
cable length. The maximum continuous counting rate is limited by input filtering to 2/3 of fCLK.
Encoder interface timing
AC-Characteristics
clock period is tCLK
Parameter
Symbol Conditions
Min
Typ
Max
Unit
Encoder counting frequency
A/B/N input low time
A/B/N input high time
A/B/N spike filtering time
fCNT
<2/3 fCLK
fCLK
3 tCLK+20
3 tCLK+20
tABNL
tABNH
tFILTABN
ns
ns
Rising and falling
edge
3 tCLK
20.2 Setting the Encoder to Match Motor Resolution
Encoder example settings for motor parameters: USC=256 µsteps, 200 fullstep motor
Factor = FSC*USC / encoder resolution
ENCODER EXAMPLE SETTINGS FOR A 200 FULLSTEP MOTOR WITH 256 MICROSTEPS
Encoder resolution
Required encoder factor
256
Comment
200
360
142.2222
No exact match possible!
= 9320675.5555 / 2^16
= 1422222.2222 / 10000
102.4
= 6710886.4 / 2^16
= 1024000 / 10000
51.2
500
Exact match with decimal setting
Exact match with decimal setting
1000
1024
4000
4096
50
12.8
12.5
3.125
Exact match with decimal setting
16384
Example:
The encoder constant register shall be programmed to 51.2 in decimal mode. Therefore, set
퐸ꢛ퐶_퐶ꢑꢛ푆ꢘ = 5ꢃ ∗ ꢀ1ꢤ + ꢄ.ꢀ ∗ ꢃꢄꢄꢄꢄ
www.trinamic.com