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.
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.
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.
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.
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.
Previous article:ANWEI1020 Telephone Automatic Dialer Principle
Next article:Design of invisible anti-theft net for balcony realized by single chip microcomputer
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Unboxing
- Tmall Genie controls ESP8266 to light up LED lights
- Recommended high voltage mosfet models
- CC3200 PWM and ADC issues
- Cheap_flash_fs (FAT high-end version) -- embedded FAT16/32 file system free source code download
- Single-cell lithium battery fuel gauge
- CS5090 5V USB input charges 2 lithium batteries, with path management application, which can realize the function of "charging and discharging at the same time".
- Free review: National Technology low power series, N32L43x is now available for testing
- DSP interrupt system and its application
- MSP430G2553 interrupt processing function