Docsity

detector de quadratura , Manuais, Projetos, Pesquisas de Mecatrônica

Toggle sidebar
bg1
Quadrature Decoder/Counter
Interface ICs
Technical Data
HCTL-2000
HCTL-2016
HCTL-2020
Features
• Interfaces Encoder to
Microprocessor
• 14 MHz Clock Operation
• Full 4X Decode
• High Noise Immunity:
Schmitt Trigger Inputs Digital
Noise Filter
• 12 or 16-Bit Binary Up/
Down Counter
• Latched Outputs
• 8-Bit Tristate Interface
• 8, 12, or 16-Bit Operating
Modes
• Quadrature Decoder Output
Signals, Up/Down and Count
• Cascade Output Signals, Up/
Down and Count
• Substantially Reduced
System Software
ESD WARNING: Standard CMOS handling precautions should be observed with the HCTL-20XX family
ICs.
Devices
Part Number Description Package Drawing
HCTL-2000 12-bit counter. 14 MHz clock operation. A
HCTL-2016 All features of the HCTL-2000. 16-bit counter. A
HCTL-2020 All features of the HCTL-2016. Quadrature decoder output B
signals. Cascade output signals.
Description
The HCTL-2000, 2016, 2020 are
CMOS ICs that perform the
quadrature decoder, counter, and
bus interface function. The
HCTL-20XX family is designed to
improve system performance
Applications
• Interface Quadrature
Incremental Encoders to
Microprocessors
• Interface Digital Potentiom-
eters to Digital Data Input
Buses
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Pré-visualização parcial do texto

Baixe detector de quadratura e outras Manuais, Projetos, Pesquisas em PDF para Mecatrônica, somente na Docsity!

Quadrature Decoder/Counter

Interface ICs

Technical Data

HCTL-

HCTL-

HCTL-

Features

- Interfaces Encoder to **Microprocessor

  • 14 MHz Clock Operation
  • Full 4X Decode
  • High Noise Immunity:** Schmitt Trigger Inputs Digital Noise Filter - 12 or 16-Bit Binary Up/ **Down Counter
  • Latched Outputs
  • 8-Bit Tristate Interface
  • 8, 12, or 16-Bit Operating** **Modes
  • Quadrature Decoder Output** **Signals, Up/Down and Count
  • Cascade Output Signals, Up/** **Down and Count
  • Substantially Reduced** System Software

ESD WARNING: Standard CMOS handling precautions should be observed with the HCTL-20XX family ICs.

Devices

Part Number Description Package Drawing HCTL-2000 12-bit counter. 14 MHz clock operation. A HCTL-2016 All features of the HCTL-2000. 16-bit counter. A HCTL-2020 All features of the HCTL-2016. Quadrature decoder output B signals. Cascade output signals.

Description

The HCTL-2000, 2016, 2020 are CMOS ICs that perform the quadrature decoder, counter, and bus interface function. The HCTL-20XX family is designed to improve system performance

Applications

- Interface Quadrature Incremental Encoders to **Microprocessors

  • Interface Digital Potentiom-** eters to Digital Data Input Buses

in digital closed loop motion control systems and digital data input systems. It does this by shifting time intensive quadrature decoder functions to a cost effective hardware solution. The entire HCTL-20XX family con- sists of a 4x quadrature decoder, a binary up/down state counter,

and an 8-bit bus interface. The use of Schmitt-triggered CMOS inputs and input noise filters allows reliable operation in noisy environments. The HCTL- contains a 12-bit counter. The HCTL-2016 and 2020 contain a 16-bit counter. The HCTL- also contains quadrature decoder

output signals and cascade signals for use with many standard counter ICs. The HCTL- 20XX family provides LSTTL compatible tri-state output buffers. Operation is specified for a temperature range from -40 to +85°C at clock frequencies up to 14 MHz.

Package Dimensions

Operating Characteristics

Table 1. Absolute Maximum Ratings (All voltages below are referenced to VSS) Parameter Symbol Limits Units DC Supply Voltage VDD -0.3 to +5.5 V Input Voltage VIN -0.3 to VDD +0.3 V Storage Temperature TS -40 to +125 °C Operating Temperature TA[1]^ -40 to +85 °C

Table 2. Recommended Operating Conditions Parameter Symbol Limits Units DC Supply Voltage VDD +4.5 to +5.5 V Ambient Temperature TA[1]^ -40 to +85 °C

19.05 ± 0. (0.750 ±^ 0.010)

15 ° 1.52 ± 0. (0.060 ± 0.005)

25.91 ± 0. (1.02 ± 0.010)

9.40 (0.370)

15 °

Functional Pin Description

Table 4. Functional Pin Descriptions

Pin Pin Symbol 2000/2016 2020 Description VDD 16 20 Power Supply VSS 8 10 Ground CLK 2 2 CLK is a Schmitt-trigger input for the external clock signal. CHA 7 9 CHA and CHB are Schmitt-trigger inputs which accept the outputs CHB 6 8 from a quadrature encoded source, such as incremental optical shaft encoder. Two channels, A and B, nominally 90 degrees out of phase, are required. RST 5 7 This active low Schmitt-trigger input clears the internal position counter and the position latch. It also resets the inhibit logic. RST is asynchronous with respect to any other input signals. OE 4 4 This CMOS active low input enables the tri-state output buffers. The OE and SEL inputs are sampled by the internal inhibit logic on the falling edge of the clock to control the loading of the internal position data latch. SEL 3 3 This CMOS input directly controls which data byte from the position latch is enabled into the 8-bit tri-state output buffer. As in OE above, SEL also controls the internal inhibit logic. SEL BYTE SELECTED 0 High 1 Low

CNTDCDR 16 A pulse is presented on this LSTTL-compatible output when the quadrature decoder has detected a state transition. U/D 5 This LSTTL-compatible output allows the user to determine whether the IC is counting up or down and is intended to be used with the CNTDCDR and CNTCAS outputs. The proper signal U (high level) or D (low level) will be present before the rising edge of the CNTDCDR and CNTCAS outputs. CNTCAS 15 A pulse is presented on this LSTTL-compatible output when the HCTL-2020 internal counter overflows or underflows. The rising edge on this waveform may be used to trigger an external counter. D0 1 1 D1 15 19 D2 14 18 D3 13 17 D4 12 14 D5 11 13 D6 10 12 D7 9 11 NC 6 Not connected - this pin should be left floating.

These LSTTL-compatible tri-state outputs form an 8-bit output port through which the contents of the 12/16-bit position latch may be read in 2 sequential bytes. The high byte, containing bits 8-15, is read first (on the HCTL-2000, the most significant 4 bits of this byte are set to 0 internally). The lower byte, bits 0-7, is read second.

Switching Characteristics

Table 5. Switching Characteristics Min/Max specifications at VDD = 5.0 ± 5%, TA = -40 to + 85°C.

Symbol Description Min. Max. Units 1 t (^) CLK Clock period 70 ns 2 t (^) CHH Pulse width, clock high 28 ns 3 t (^) CD[1]^ Delay time, rising edge of clock to valid, updated count 65 ns information on D0- 4 t (^) ODE Delay time, OE fall to valid data 65 ns 5 t (^) ODZ Delay time, OE rise to Hi-Z state on D0-7 40 ns 6 t (^) SDV Delay time, SEL valid to stable, selected data byte 65 ns (delay to High Byte = delay to Low Byte) 7 tCLH Pulse width, clock low 28 ns 8 t (^) SS[2]^ Setup time, SEL before clock fall 20 ns 9 t (^) OS[2]^ Setup time, OE before clock fall 20 ns 10 t (^) SH[2]^ Hold time, SEL after clock fall 0 ns 11 t (^) OH[2]^ Hold time, OE after clock fall 0 ns 12 t (^) RST Pulse width, RST low 28 ns 13 t (^) DCD Hold time, last position count stable on D0-7 after clock rise 10 ns 14 t (^) DSD Hold time, last data byte stable after next SEL state change 5 ns 15 t (^) DOD Hold time, data byte stable after OE rise 5 ns 16 tUDD Delay time, U/D valid after clock rise 45 ns 17 t (^) CHD Delay time, CNTDCDR or CNTCAS high after clock rise 45 ns 18 t (^) CLD Delay time, CNTDCDR or CNTCAS low after clock fall 45 ns 19 t (^) UDH Hold time, U/D stable after clock rise 10 ns 20 tUDCS Setup time, U/D valid before CNTDCDR or CNT (^) CAS rise tCLK -45 ns 21 t (^) UDCH Hold time, U/D stable after CNTDCDR or CNT (^) CAS rise tCLK -45 ns

Notes:

  1. tCD specification and waveform assume latch not inhibited.
  2. tSS, tOS , tSH , tOH only pertain to proper operation of the inhibit logic. In other cases, such as 8 bit read operations, these setup and hold times do not need to be observed.

Figure 3. Tri-State Output Timing.

Digital Noise Filter

The digital noise filter section is responsible for rejecting noise on the incoming quadrature signals. The input section uses two techniques to implement improved noise rejection. Schmitt-trigger inputs and a three-clock-cycle delay filter combine to reject low level noise and large, short duration noise spikes that typically occur in motor system applications. Both common mode and differential mode noise are rejected. The user benefits from these techniques by improved integrity of the data in

input is tested for a stable level being present for three consecutive rising clock edges. Therefore, the filtered output waveforms can change only after an input level has the same value for three consecutive rising clock edges. Refer to Figure 8 which shows the timing diagram. The result of this circuitry is that short noise spikes between rising clock edges are ignored and pulses shorter than two clock periods are rejected.

the counter. False counts triggered by noise are avoided.

Figure 7 shows the simplified schematic of the input section. The signals are first passed through a Schmitt trigger buffer to address the problem of input signals with slow rise times and low level noise (approximately < 1 V). The cleaned up signals are then passed to a four-bit delay filter. The signals on each channel are sampled on rising clock edges. A time history of the signals is stored in the four-bit shift register. Any change on the

Figure 6. Simplified Logic Diagram.

Operation

A block diagram of the HCTL- 20XX family is shown in Figure 6. The operation of each major function is described in the following sections.

Figure 7. Simplified Digital Noise Filter Logic.

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). When using an encoder for motion sensing, the user benefits from the increased resolution by being able to provide better system control.

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 internal position counter. In the case of the HCTL-2020, the signals also go to external pins 5 and 16 respectively.

Figure 9 shows the quadrature states and the valid state transi- tions. 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.

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

Figure 8. Signal Propagation through Digital Noise Filter.

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 below), inhibits the position data latch. The RST signal asynchronously clears the inhibit logic, enabling the latch. A simplified logic diagram of the inhibit circuitry is illustrated in Figure 11.

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. In the case of the HCTL-2000 the data latch is only 12 bits wide and the upper four bits of the high byte are internally set to zero.

Quadrature Decoder

Output (HCTL-

Only)

The quadrature decoder output section consists of count and up/ down outputs derived from the 4X decode logic of the HCTL-

  1. 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 CNTDCDR pulse, and held one clock cycle after the rising edge of the CNTDCDR pulse. These outputs are not affected by the inhibit logic. See Figures 5 and 12 for detailed timing.

Cascade Output (HCTL-

2020 Only)

The cascade output also consists of count and up/down outputs. When the HCTL-2020 internal counter overflows or underflows, a pulse, one-half clock cycle long, will be output on the CNTCAS 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 CNTCAS pulse, and held one clock cycle after the rising edge of the CNTCAS pulse. These outputs are not affected by the inhibit logic. See Figures 5 and 12 for detailed timing.

Figure 11. Simplified Inhibit Logic.

Inhibit Step SEL OE CLK Signal Action 1 L L 1 Set inhibit; read high byte 2 H L 1 Read low byte; starts reset 3 X H 0 Completes inhibit logic reset

Figure 10. Two Byte Read Sequence.

Cascade Considerations

(HCTL-2020 Only)

The HCTL-2020’s cascading system allows for position reads of more than two bytes. These reads can be accomplished by latching all of 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- internal counter/latch combination.

Consider the sequence of events for a read cycle that starts as the HCTL-2020’s 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 (tCHD). 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 CNTCAS 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- 2020 count is at FFFFH and an external counter is at F0H, with the count going up. A count occurring in the HCTL-2020 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-

  1. 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.

Figure 12. Decode and Cascade Output Diagram.

CLK

CHA (^) FILT*

U/D

COUNT

CHB (^) FILT*

CNT (^) DCDR*

CNTCAS

*CHAFILT AND CHBFILT ARE THE OUTPUTS OF THE DIGITAL NOISE FILTER (SEE FIGURES 7 AND 8).

FFFDH FFFEH FFFFH 0000H FFFFH FFFDH

INTERNAL COUNTER ROLL OVER

FF

START INHIBIT

00

low on OE during a falling clock edge.

  1. When OE goes high, the data lines change to a high imped- ance state.
  2. The IC detects a logic high on OE during a falling clock edge. This satisfies the second reset condition for the inhibit logic.

Actions

  1. On the rising edge of the clock, counter data is transferred to the position data latch, provided the inhibit signal is low.
  2. When OE goes low, the outputs of the multiplexer are enabled onto the data lines. If SEL is low, then the high order data bytes are enabled onto the data lines. If SEL is high, then the low order data bytes are enabled onto the data lines. 3. When the IC detects a low on OE and SEL during a falling clock edge, the internal inhibit signal is activated. This blocks new data from being transferred from the counter to the position data latch. 4. When SEL goes high, the data outputs change from the high byte to the low byte. 5. The first of two reset condi- tions for the inhibit logic is met when the IC detects a logic high on SEL and a logic

Interfacing the HCTL-2020 to a Motorola 6802/8 and Cascading the Counter for 24

Bits

Figure 14. A Circuit to Interface to the 6802/8.

Actions

  1. The microprocessor clock output is E. If the internal HCTL-2020 inhibit is not active, new data is trans- ferred from the internal counter to the position data latch.
  2. An even address output from the 6802 causes SEL to go low. When E goes high, the address decoder output for the HCTL-2020 OE signal goes low. This causes the HCTL-2020 to output the middle byte of the system counter (high byte of the HCTL-2020 counter). This middle byte, FFFFH is available at (2) through (4), the first time OE is low. In this example an overflow

has occurred and OE has been pulled low to start a read cycle. SEL and OE are gated to give RCK which latches the external high byte, equal to 00H. The falling edge, of the CNTCAS signal counts up the external counter to 0001H.

  1. With the first negative edge of the clock after SEL and OE are low the internal latches are inhibited from counting and the 6802 reads the high byte in.
  2. OE goes high and the data bus goes into a high impedance state.
  3. OE is low and SEL is high and the low byte is enabled onto the data bus. The low byte is valid through (7). 6. With the first negative edge after OE and SEL go high, the first of the two HCTL- 2020 inhibit reset conditions is met and the 6802 reads the low byte in. 7. The data bus returns to the high impedance state, when OE goes high. 8. With the first negative edge of the clock after OE goes high, inhibit reset is complete. 9. With the positive going edge of the clock, G is asserted and the external high byte, 00H is available on the data bus from 9 through 10 and the 6802 reads the high byte in at (10).

Figure 16. Interface Timing for the 6802/8.

CLK

SEL

INTERNAL INHIBIT

DATA BUS

OE

CNTCAS

HCTL-2020INTERNAL CLOCK FFFF 0000

RCK

G

ACTIONS

HIGH Z

1 1 1 2 3

4 5 6

7 8 9 10

MID BYTE

LOW BYTE

HIGH BYTE

is the crystal frequency divided by 3. T0 must be enabled by executing the ENT0 CLK instruction after each system reset, but prior to the first encoder position change. An 8748 program which interfaces to the circuit in Figure 17 is given in Figure 18. The resulting interface timing is shown in Figure 19.

Interfacing the HCTL-

20XX to an Intel 8748

The circuit shown in Figure 17 shows the connections between an HCTL-20XX and an 8748. Data lines D0-D7 are connected to the 8748 bus port. Bits 0 and 1 of port 1 are used to control the OE and SEL inputs of the HCTL- 20XX respectively. T0 is used to provide a clock signal to the HCTL-20XX. The frequency of T

Figure 17. An HCTL-20XX-to-Intel 8748 Interface.

*** NOTE: PIN NUMBERS ARE DIFFERENT FOR THE HCTL-2020.**

Object Source LOC Code Statements Comments 000 99 00 ANL P1, 00H Enable output and higher order bits 002 08 INS A, BUS Load higher order bits into ACC 003 A8 MOVE R0, A Move data to register 0 004 89 02 ORL P1, 02H Enable output and lower order bits 006 08 INS A, BUS Load order bits into AC 008 A9 MOV R1, A Move data to register 1 009 89 03 ORL P1, 03H Disable outputs 00B 93 RETR Return

Figure 18. A Typical Program for Reading HCTL-20XX with an 8748.

www.semiconductor.agilent.com Data subject to change. Copyright © 1999 Agilent Technologies, Inc. Obsoletes 5091-9974E (3/94) 5965-5894E (11/99)