10
Design Considerations
The designer should be aware that the operation of
the digital filter places a timing constraint on the
relationship between incoming quadrature signals and
the external clock. Figure 8 shows the timing waveform
with an incremental encoder input. Since an input has
to be stable for three rising clock edges, the encoder
pulse width (t
E
- low or high) has to be greater than
three clock periods (3t
CLK
). This guarantees that the
asynchronous input will be stable during three
consecutive rising clock edges. A realistic design also
has to take into account finite rise time of the
waveforms, asymmetry of the waveforms, and noise.
In the presence of large amounts of noise, t
E
should be
much greater than 3t
CLK—
to allow for the interruption
of the consecutive level sampling by the three-bit delay
filter. It should be noted that a change on the inputs
that is qualified by the filter will internally propagate
in a maximum of seven clock periods.
The quadrature decoder circuitry imposes a second
timing constraint between the external clock and the
input signals. There must be at least one clock period
between consecutive quadrature states. As shown in
Figure 8, a quadrature state is defined by consecutive
edges on both channels. Therefore, t
ES
(encoder state
period) > t
CLK-
. The designer must account for
deviations from the nominal 90 degree phasing of input
signals to guarantee that t
ES
> t
CLK
.
Position Counter
This section consists of a 16-bit binary up/down
counter which counts on rising clock edges as
explained in the Quadrature Decoder Section. All 16-
bit of data are passed to the position data latch. The
system can use this count data in several ways:
A. System total range is £ 16 bits, so the count
represents “absolute” position.
B. The system is cyclic with £ 16 bits of count per
cycle. RSTN (or CHI) is used to reset the counter
every cycle and the system uses the data to
interpolate within the cycle.
C. System count is > 8 or 16 bits, so the count data is
used as a relative or incremental position input for
a system software computation of absolute
position. In this case counter rollover occurs. In
order to prevent loss of position information, the
processor must read the outputs of the IC before
the count increments one-half of the maximum
count capability. Two’s-complement arithmetic is
normally used to compute position from these
periodic position updates.
D. The system count is >16 bits so the HCTL-2021-
A00/PLC can be cascaded with other standard
counter ICs to give absolute position.
Figure 9. 4x Decoder Mode
Quadrature Decoder
The quadrature decoder decodes the incoming filtered
signals into count information. This circuitry multiplies
the resolution of the input signals by a factor of four
(4X decoding).
The quadrature decoder samples the outputs of the
CHA and CHB filters. Based on the past binary state of
the two signals and the present state, it outputs a count
signal and a direction signal to the integral position
counter.
Figure 9 shows the quadrature states of Channel A and
Channel B signals. The 4x decoder will output a count
signal for every state transition (count up and count
down). Figure 9 shows the valid state transitions for 4x
decoder. The 4x decoder will output a count signal at
respective state transition, depending on the counting
direction. Channel A leading channel B results in
counting up. Channel B leading channel A results in
counting down. Illegal state transitions, caused by
faulty encoders or noise severe enough to pass through
the filter, will produce an erroneous count.
CHA CHB STATE
4X Decoder
(Count Up &
Count Down)
101Pulse
112Pulse
013Pulse
004Pulse
1
23 4
clk
state
chA
chB
Tes
Te
Telp
1
2
3
4
Valid State
Transitions
count up
count
down
11
Position Data Latch
The position data latch is a 16-bit latch which captures
the position counter output data on each rising clock
edge, except when its inputs are disabled by the inhibit
logic section during two-byte read operations. The
output data is passed to the bus interface section.
When active, a signal from the inhibit logic section
prevents new data from being captured by the latch,
keeping the data stable while successive reads are
made through the bus section. The latch is
automatically re-enabled at the end of these reads. The
latch is cleared to 0 asynchronously by the RST signal.
Inhibit Logic
The Inhibit Logic Section samples the OE and SEL
signals on the falling edge of the clock and, in response
to certain conditions (see Figure 10), inhibits the
position data latch. The RST signal asynchronously
clears the inhibit logic, enabling the latch.
Bus Interface
The bus interface section consists of a 16 to 8 line
multiplexer and an 8-bit, three-state output buffer. The
multiplexer allows independent access to the low and
high bytes of the position data latch. The SEL and OE
signals determine which byte is output and whether
or not the output bus is in the high-Z state.
Figure 10. Two Bytes Read Sequence
Figure 11. Simplified Inhibit Logic
Step SEL OE CLK Inhibit Signal Action
1 L L Falling 1 Set inhibit; read high byte
2 H L Falling 1 Read low byte; starts reset
3 X H Falling 0 Complete inhibit logic reset
Quadrature Decoder Output
The quadrature decoder output section consists of
count and up/down outputs derived from the 4x
decoder mode of the HCTL-2021-A00/PLC. When the
decoder has detected a count, a pulse, one-half clock
cycle long, will be output on the CNT
DCDR
pin. This
output will occur during the clock cycle in which the
internal counter is updated. The U/D pin will be set to
the proper voltage level one clock cycle before the
rising edge of the CNT
DCDR
pulse, and held one clock
cycle after the rising edge of the CNT
DCDR
pulse. These
outputs are not affected by the inhibit logic.
Cascade Output (HCTL-2021-A00/PLC only!)
The cascade output also consists of count and up/down
outputs. When the HCTL-2021-A00/PLC internal
counter overflows or underflows, a pulse, one-half clock
cycle long, will be output on the CNT
CAS
pin. This
output will occur during the clock cycle in which the
internal counter is updated. The U/D pin will be set to
the proper voltage level one clock cycle before the
rising edge of the CNT
CAS
pulse, and held one clock
cycle after the rising edge of the CNT
CAS
pulse. These
outputs are not affected by the inhibit logic.
12
Figure 12. Decode and Cascade Output Diagram (4x)
Cascade Considerations (HCTL-2021-A00/PLC only!)
The HCTL-2021-A00/PLC cascading system allows for
position reads of more than two bytes. These reads
can be accomplished by latching all the bytes and then
reading the bytes sequentially over the 8-bit bus. It is
assumed here that, externally, a counter followed by a
latch is used to count any count that exceeds 16 bits.
This configuration is compatible with the HCTL-2021-
A00/PLC internal counter/latch combination.
Consider the sequence of events for a read cycle that
starts as the HCTL-2021-A00/PLC internal counter rolls
over. On the rising clock edge, count data is updated
in the internal counter, rolling it over. A count-cascade
pulse (CNT
CAS
) will be generated with some delay after
the rising clock edge (t
CHD
). There will be additional
propagation delays through the external counters and
registers. Meanwhile, with SEL and OE low to start the
read, the internal latches are inhibited at the falling
edge and do not update again till the inhibit is reset.
If the CNT
CAS
pulse now toggles the external counter
and this count gets latched a major count error will
occur. The count error is because the external latches
get updated when the internal latch is inhibited.
Valid data can be ensured by latching the external
counter data when the high byte read is started (SEL
and OE low). This latched external byte corresponds
to the count in the inhibited internal latch. The cascade
pulse that occurs during the clock cycle when the read
begins gets counted by the external counter and is
not lost.
For example, suppose the HCTL-2021-A00/PLC count
is at FFFFh and an external counter is at F0h, with the
count going up. A count occurring in the HCTL-2021-
A00/PLC will cause the counter to roll over and a
cascade pulse will be generated. A read starting on
this clock cycle will show FFFFh from the HCTL-2021-
A00/PLC. The external latch should read F0h, but if the
host latches the count after the cascade signal
propagates through, the external latch will read F1h.

HCTL-2021-A00

Mfr. #:
Manufacturer:
Broadcom / Avago
Description:
Encoders, Decoders, Multiplexers & Demultiplexers Quadrature Decoder
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union