HCTL2 2032 decoder applied to CNC system

1. Introduction to HCTL22032

HCTL22032 is a fine resolution circuit produced by Agilent. It has four subdivision and discrimination functions. It can receive two orthogonal pulse signals, and also has anti-interference design. The reversible counter is designed on the chip, and the chip integration is high. The clock cycle reaches 33MHz, which not only greatly simplifies the design of the peripheral circuit, but also improves the measurement accuracy and the speed of processing the data.

1.1HCTL22032 pin and function from the pulse encoder square wave signals CHAx, CHBx and CHAy, CHBy end is sent to the integrated chip, the input signal is first pre-processed by Schmitt trigger and digital filter, which largely eliminates Noise can cause false counts. The pre-processed signal generates a count pulse and a direction control signal through the four-fine resolution circuit, and they are sent to the internal reversible counter, and the counter is 32 bits. The count value is latched to the latter latch on the rising edge of CLK, and the latched data is also 32 bits. Since the output data line has only 8 bits, the 32-bit data needs to be read out four times by changing the values ​​of the control lines SEL1, SEL2, /OE.

1.2HCTL2032 working principle

The HCTL22032 consists of a Schmitt trigger, a digital filter, a four-fine resolution circuit, a 32-bit reversible counter, a 32-bit latch, and a buffer.

2 anti-interference link design

In order to improve the chip's anti-jamming capability, the input signal is first pre-processed by a Schmitt trigger and a digital filter. The function of the Schmitt trigger is to filter out the low amplitude noise (about less than 1V) in the signal and improve the slope of the rising edge of the signal; the function of the digital filter is to verify the pulse width of the input square wave with the clock signal CK. A narrow pulse (less than 3 CLK cycles) is considered as interference and filtered out. These two designs largely eliminate the false counts that noise can cause.

2.1 orthogonal decoding

The combined mode of EN1 and EN2 can select the decoding mode of HCTL22032. There are three types: 43, 23, 13.CHA. CHB two square waves have two rising edges and two falling edges in one cycle. When 43 mode is selected. Four subdivisions are implemented by processing each edge; when the 23 mode is selected, only the edges of one of the square waves are processed; when the 13 mode is selected, only the rising or falling edge of a set of square waves is selected. Process it. In each of the three modes, whenever an edge state to be processed is detected, a positive pulse having a width of half a clock cycle is outputted at the CNTDEC pin, and a direction control signal U/D is given, when U/D= 1, indicating that CHA leads to CHB; when U/D=0, CHA lags CHB

2.2 32-bit reversible counter and 32-bit latch

A count pulse and a direction control signal generated by orthogonal decoding are sent to the internal reversible counter, and the counter is 32 bits. The count value is typically latched to the next latch on the rising edge of CLK, and the latched data is also 32 bits. The system can use this data in several ways:

1) The count value is within the total 32-bit count range, and the count value represents the absolute position.

2) The system counts 32-bit periodic motions per cycle, and the counter can be reset by RSTN every cycle.

3) When the system count range is greater than 32 bits, the count value is used to calculate the increment of the absolute position, then the counter will overflow or underflow. In order to prevent the loss of position information, the system must reach the counter maximum count capacity in the count value. Read the data in the latch halfway.

4) When the system count range is greater than 32 bits, it can also be cascaded with other standard counting chips by HCTL22032 to obtain the absolute position.

3. Designed for data acquisition system of numerical control system

CY7C68013 is a new generation of high-speed USB series from Cypress Semiconductor that can transmit data with USB2.0 maximum data rate. The chip provides USB 2.0 support through an integrated 480Mb/s transmitter, intelligent SIE, enhanced 8051 microcontroller running at 48MHz, memory and programmable I/O interface. The 8051 core is very comprehensive and contains 256 bytes of register RAM, 2 USARTs, 3 timers/counters and 2 data pointers. Compared to the standard 8051, the EZ2USBFX2 CPU adds 8 interrupt sources. The internal microcontroller of the chip can meet the requirements of the interface circuit design of the system. In the circuit design part, since the HCTL22032 can collect the encoder signals of two channels, the design separately collects the X feed through two interfaces J1 and J2. The shaft encoder signal and the Y feed axis encoder signal are used to accurately judge the machining information of the CNC machine. This design adopts the dual mode of automatic power supply and external power supply to ensure that the system can work safely at any time, and also has a reset module. When re-collecting data, press button K1. The operating voltage of CY7C68013 is 3.3V, and the working voltage of HCTL22032 is 5V. The two can't be directly connected. The level conversion chip must be used between them. This design uses 74LVC245 and 74HCT245 for level conversion.

4 software design

4.1 initialization

The initialization of CY7C68013 includes setting the clock frequency, configuring the working status of each endpoint, enabling the pointer characteristics, and setting the I/O port according to the interface circuit to enable the remote wake-up function.

4.2 reading data

This design uses the port mode of CY7C68013 to realize data communication. The required control signals are provided by CY7C68013 itself. For port mode, the control signal does not have a dedicated port line, so it must be done with a general purpose I/O interface. In this design, the IOD 8-bit I/O port is used as the control line of the HCTL22032. The IOB port is used as the data transmission line. Before reading the data, the decoding mode should be selected. The system adopts 43 mode. The HCTL22032 can acquire the encoder signals of the two channels. Therefore, the channel must be selected by setting X/Y, and the inhibit logic must be reset because The latch update must be disabled during data transfer. Then set the values ​​of OEN, SEL1, SEL2 to transfer data from high to low in turn.

5 Conclusion

HCTL22032 decoder chip has high integration, internal design of Schmitt trigger and filtering function, with anti-interference design; special orthogonal decoding function, can realize pulse signal decoding function simply and flexibly; the chip designs reversible counter on chip The counting process is completed by the hardware of the chip itself, which reduces the CPU load; the clock cycle reaches 33 MHz, which not only greatly simplifies the design of the peripheral circuit, but also improves the measurement accuracy and the speed of processing the data. HCTL22032 and CPU interface is simple, this paper realizes the interface circuit hardware design of HCTL22032 decoder chip and MX2USBFX2CY7C68013 with USB function, and realizes software design according to hardware design, adopts CY7C68013 as the main controller, makes the system simple and convenient to realize USB interface Plug and play function, and generally do not need external power supply, easy to use, its internal enhanced 8051 can also meet the requirements of the interface circuit design of this system. When the design is applied to the numerical control system, it can be used as a data acquisition device to monitor the machining of CNC machine tools. It can also be used as a direct feedback for position loop closed-loop control in a fully software-based open CNC system. It is not only simple and reliable but also highly reliable. . In other industrial fields, HCTL22032 and the interface circuit design implemented in this paper, such as robot motion control system, can also be used.

(Finish)

Peanut Dryer

Introduction of Commercial Peanut Roaster Machine:
The machine is a horizontal drum roasting machine that uses direct fire for materials. It is composed of a horizontal drum boiler body, a pan support frame, a frying pan arch, a power transmission part, and a charging and discharging mechanism. The roller pot body is mounted on the support frame of the pot body through the bearing, and the roller pot body can rotate around the roller shaft. Under the direct fire action, the materials contained in the roller pot body are evenly baked, and the roller pot body is also heated evenly. The wok burst accident occurred. The upper part of the arch body adopts a detachable vault for easy maintenance and repair.
Use of Peanut Drying Equipment
The dryer machine is suitable for all roasted seeds and nuts, raw material processing of health products, processing of nutritious raw materials, processing of raw materials for Chinese herbal medicine shops, condiments and spices processing, dried coffee beans, chestnuts, peanuts, melon seeds, walnuts, sesame seeds, beans, rice, hazelnuts, pine nuts, pistachios and other dried fruit foods.
Advantages of Nuts Dryer Machine:
1. Roasting time can set up according to client need or material. When time is on, machine will warn.
2. Heating effect is uniform. Machine is constantly rotated. Back and forth, up and down, all heating well from different direction.
3. It can large increase roasting material oil squeezing rate. Usually equipped with oil press machine.
4. Roasting time is short. Each time it needs about 20minutes. Of course, different situation, roasting time will be a little different. For example, if you won't need the soybean skin crack, then 20 minutes is ok, if you will need the skin crack completely, then need about 40min one time.
5. Reasonable structure, low energy consumption, high efficiency, safety.
6. Low investment costs. Machine price is low, and have many models from small to large, customers can choose according to their needs.

Peanut Dryer,Peanut Dryer Tower,Peanut Dryer Machine,Tower Dryer For Peanut

JINFENG DRYING EQUIPMENT CO.,LTD , https://www.jf-graindry.com