Design of integrated coding PT2262 decoder based on single chip microcomputer

Publisher:创新之星Latest update time:2011-08-23 Source: 电子设计工程 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, software decoding or software-hardware combined decoding methods based on waveform analysis have been proposed. However, these methods do not have self-learning functions and can only decode waveforms with specific oscillation frequencies. They cannot decode when the configuration of the oscillation resistor of the transmitting circuit PT2262 is unknown, or the program parameters need to be adjusted manually.

This paper proposes a software decoding method based on a single-chip microcomputer with self-learning function and completes the design. This new method can achieve decoding through the process of learning first and then decoding when the configuration parameters of the transmitting circuit are unknown, and can realize the format of custom data frames, making the setting of the coded address bits and data bits more flexible. Therefore, the universal coding integrated circuit can be extended to data communication, intelligent control and other fields.

1 PT2262 Working Principle

PT2262 can have up to 12 bits (A0~A11) of three-state address pins (suspended, connected to high level, connected to low level), any combination of which can provide 531441 address codes. There can be up to 6 bits (D0~D5) of data bits, and the set address code, data code and synchronization code form a data frame and are output in serial data mode.

When PT2262 and PT2272 are used in pairs, the address code of the transmitting end encoding chip FT2262 is required to be consistent with the address code of the receiving end decoding chip PT2272, and the oscillation frequency must match. The instructions and other information sent by the transmitting end to the receiving end can be encoded in the data end of the encoding chip, and after wireless transmission, it can be retrieved from the data end of the decoding chip.

The code sent by the encoding chip PT2262 consists of address code, data code and synchronization code. The address code and data code are represented by pulses of different widths. Two narrow pulses represent "0"; two wide pulses represent "1"; one narrow pulse and one wide pulse represent "f" ("floating"). Figure 1 shows the PT2262 encoding format.

PT2262 encoding format diagram

In the figure, T is twice the clock oscillation period, and the low-level width of the synchronization code is 31 times the narrow pulse width.

2 Hardware Circuit

2.1 Transmitter Circuit

The transmitting circuit is composed of a PT2262 encoder and a wireless transmitting module, as shown in Figure 2. When the PT2262 and the wireless transmitting module are powered on at the same time (here, the switch S1 is used instead, and a control circuit can be added in actual use), the set address code and data code and the fixed synchronization code form a set of codes that are serially output from pin 17 to the 315 MHz wireless data transmission module. The oscillating resistor Rosc is used to adjust the code transmission frequency, and appropriately increasing the circuit working power supply VCC can increase the transmission distance. A total of 531,441 combinations of 12-bit codes can meet various intelligent controls and low-speed, small data volume, and short-distance data communications.

Transmitter circuit
2.2 Receiving Circuit

The receiving circuit consists of a wireless receiving module, a signal conversion module and an 89C51 single-chip microcomputer. The wireless receiving module integrates wireless reception, demodulation, amplification and shaping, and can output digital signals compatible with TTL level signals. The signal conversion module mainly completes signal isolation, coding inversion, and provides interrupt signal functions for the single-chip microcomputer, as shown in Figure 3.

Receiving Circuit

When the coded signal is received, the coded signal is inverted and sent to the P0 port of the microcontroller for decoding. At the same time, a falling edge will be generated at the INT end, and the low level will be maintained during the entire signal reception process. When the transmitter stops sending the coded signal, INT returns to a high level, and the INT port signal provides an interrupt signal for the microcontroller decoding. The 89C51 microcontroller completes software decoding and controls the external execution circuit function, and is connected to an external 4 MHz crystal oscillator, as shown in Figure 4. Since the interrupt method is used to determine whether the transmission signal has arrived, the microcontroller processing overhead is greatly reduced, the power consumption is reduced, and the anti-interference performance is improved.

89C51 single chip microcomputer

3 Decoding Principle

3.1 Waveform Analysis

PT2262 transmits at least 4 groups of code words each time, and each group of code words is separated by a synchronization code. A code word includes a synchronization code, an address bit, and a data bit. The waveform oscillation frequency f=2x1000x 16/Rosc kHz, where Rosc is the oscillation resistance. A code word shown in Figure 5 is composed of "f", "f", "f", "f", "f", "f", "f", "0", "0", "1", "0", and a synchronization code from left to right.

Waveform analysis
Reference address:Design of integrated coding PT2262 decoder based on single chip microcomputer

Previous article:ANWEI1020 Telephone Automatic Dialer Principle
Next article:Design of invisible anti-theft net for balcony realized by single chip microcomputer

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号