iC-LNB 18-BIT OPTO ENCODER
WITH SPI AND SER/PAR INTERFACES
Rev A1, Page 28/35
FLEXCOUNT®
RESSUB
Addr. 0x0F; 0x10; 0x11 bit 3:0
When FlexCount is enabled in iC-LNB, the resolution
can be freely programmed and is output through the
incremental signals. Another option is to output the set
resolution through the SPI interface and the shift reg-
ister, or, in parallel encoder mode, to the parallel IO
ports. FlexCount operates in real time and does not
introduce any significant latency to the signal path.
Code
0x3
Resolution (edges per revolution)
4
0x7
8
...
RESSUB + 1
0x0FFFF
...
65536
... (only with 7/8 bit interpolation)
131072 (only with 7/8 bit interpolation)
... (only with 8 bit interpolation)
262144 (only with 8 bit interpolation)
0x1FFFF
...
0x3FFFF
Enable/disable
NB: RESSUB = resolution - 1
FlexCount can be enabled using register bit NEN-
FLEX. SELABS determines whether the FlexCount
resolution or iC-LNB’s maximum internal resolution
(dependent on RESIPO) is output for the absolute data
output (parallel encoder mode, shift register or SPI).
Table 32: FlexCount resolution
Reset
FlexCount must be stopped before the resolution or di-
rection of rotation are reprogrammed (pin DIR or regis-
ter bit DIR). This is done using register bit STOPFLEX.
This freezes the FlexCount outputs and FlexCount
goes into its reset state. After STOPFLEX has been
reset the outputs are enabled and FlexCount moves to
the current position.
NENFLEX Addr. 0x0B; bit 1
Code
Description
0
1
FlexCount enabled
FlexCount disabled
Table 30: FlexCount disable
STOPFLEX
Addr. 0x11; bit 5
Description
SELABS
Addr. 0x0B; bit 2
Code
Code
SER/PAR/SPI interface
FlexCount resolution
0
1
Normal operation
FlexCount stopped
0
1
Maximum resolution*
FlexCount reset: STOPFLEX 1 → 0
*16 bit, 17 bit, 18 bit dependent on RESIPO
Table 33: FlexCount reset
Table 31: SPI, SER, PAR absolute output options
Following a reset (STOPFLEX 1 → 0) FlexCount
searches for the current position. During this position
signals/data are not valid. Attainment of the current
position and thus valid output signals are indicated in
the status register with POSOK.
Resolution
Parameter RESSUB defines the FlexCount resolution.
The binary value in RESSUB is equivalent to the re-
quired resolution minus 1; for instance, RESSUB must
be programmed to 0x0FFFF (binary value for 65,535)
for a resolution of 65,536 steps (a 16-bit resolution).
POSOK
Addr. 0x12; bit 0
Description
Code
0
1
Position invalid
Position valid
The required resolution must be divisible by four and
the maximum resolution is limited by the set interpola-
tor resolution. At an interpolation of 6 bits FlexCount
may have a maximum resolution of 65,536 (RESSUB =
0x0FFFF); at 7-bit interpolation this maximum rises
to 131,072 (RESSUB = 0x1FFFF), and at 8 bits to a
Table 34: Position valid
full resolution of 262,144 (RESSUB = 0X3FFFF). Flex- The FlexCount output signals can be set to low using
Count is always output in Gray code for all settable res- register bit NOUTLO; FlexCount itself continues to run.
olutions. With non-binary resolutions the Gray code is This function should be used after FlexCount has been
capped symmetrically to 0. This retains the required reset to prevent the device ’running’ to the current po-
single-step transitions of the Gray code.
sition in the output signals.