Abstract: This article introduces the composition principle and implementation method of a parallel port-based multi-machine line communication system implemented using the three-state codec chip MC145026/27, and provides solutions to wireless communication problems between multiple microcomputers, etc. The overall composition and communication method of the system are explained.
Keywords: Parallel interface wireless communication encoder decoder MC145026/27
1 Introduction
In fields such as telemetry and remote control, microcomputers and microcontrollers are often used to form multi-machine communication systems to complete measurement and control tasks. Among them, the commonly used method is to use the RS-232C serial interface of a microcomputer for serial data communication. Due to the influence of the environment and the limitations of the electrical performance of the RS-232C serial interface, as well as shortcomings such as long connection lines and troublesome wiring, the spatial range of its communication is always limited and makes people feel inconvenient. Therefore, people thought of wireless transmission. Commonly used wireless transmission methods include wireless shortwave transmission and infrared transmission, but these two methods have certain limitations. For example, the shortwave method is susceptible to interference from external electromagnetic fields, and the external line transmission method cannot be transmitted through walls, etc. This article will introduce the methods used. The latest wireless long-wave transceiver module T630/T631, and the latest three-state codec chip MC145026/MC145027 are used to design wireless data communication devices. The device has the characteristics of good anti-interference performance, strong penetration and long transmission distance. Due to the slow transmission speed of the serial interface and the complexity of the signal processing circuit, it is difficult to connect external modules. Therefore, this device uses parallel interface communication, making the circuit simple and easy to build and highly reliable.
2 System composition
As shown in Figure 1, this device is mainly composed of two modules: data encoding and decoding and transmitting and receiving. Among them, the data encoding and decoding module is used to complete tasks such as input and output of data information, address encoding, address identification, and data parallel/serial conversion; the transmitting and receiving module is used to complete tasks such as modulation, transmission, reception and demodulation of serial data.
2.1 Codec module
The encoding and decoding module consists of three-state encoding and decoding chips MC145026 and MC145027. This set of chips is the latest chip produced by Motorola for communication pairing. The encoding chip MC145026 can encode 9-bit input information (address bits A1~A5, data bits D6~D9). After encoding, each data bit is represented by two pulses: "1" is encoded as two wide pulses; "0" The encoding is two narrow pulses; the "open" encoding is a wide pulse interleaved with a narrow pulse. When the TE terminal input pulse rises, the encoded data stream begins to be serially output by D0. Each 9-bit data information can be regarded as a data word. In order to improve the security of communication, the encoding and decoding chip sends each data word twice and receives it twice.
MC145027 decoder is used to receive the encoded data stream output by MC145026. When the decoder address and encoder address status are consistent and two sets of identical encoding signals are continuously received, the VT terminal jumps from low level to high level to indicate that the reception is valid, and at the same time interrupts the computer to receive. When the address bit of the received data stream is different from the local address setting, or the data received twice is different, or there is no signal within four data cycles, the VT terminal becomes low level, and it can be considered that there is no signal at this time. The signal or belief is that the signal is not sent to this unit. Since the address identification of the received information is completed by the MC145027 chip, information that is not sent to the local machine is usually not transmitted to the parallel interface, so it will not affect the work of the local machine.
2.2 Transmitting and receiving module
The transmitting and receiving module consists of long-wave digital signal transceiver chips T630 and T631. This set of chips can be used to transmit and receive serial data signals. Long groups can penetrate barriers such as buildings, chassis, and metal equipment. Its transmission power is in the mW level and in the 150kHz frequency band, so it will not interfere with other circuits. At the same time, it is difficult to be interfered by other circuits. Its power supply voltage range is 1.5~20V and can be powered by the +5V pin of the parallel interface. The chip integrates various components including the antenna, and its external circuit and application interface are also very simple.
3 Communication Principles
3.1 Utilization of parallel interfaces
The parallel interface of the microcomputer CENTRONIC printer includes an 8-bit data output register, an 8-bit data input register, a 5-bit control output register and a 5-bit status input register. Writing operations to the interface data output register can achieve the output of 8-bit information; and operations on the interface control register can change the status of the output control lines; reading operations on the interface status input register can obtain the status information of the peripherals. The CENTRONIC parallel interface uses 8 data lines, 4 control lines and 5 status lines when connecting to peripherals. The data line signals are DATA0~DATA7, and the control line signals are "strobe" (STROBE), "initialization" (INIT), "printer input selection" (SLCTIN) and "automatic paper feed" (AUTOFDXT). Among them, when the SLCTIN signal is low level, it means using the parallel interface to transmit data information to the printer; when STROBE generates a negative pulse signal, it means strobe the printer, then the printer will receive the data signal on the data line; INIT signal and AUTOFDXT The signal is not used during normal data transmission and its status always remains unchanged. Status signals include: "BUSY", "ERROR", "Paper Out" (PE), "Select" (SLCT) and "ACK" (ACK). It can be seen that the CENTRONIC parallel interface can complete an 8-bit data output, a 4-bit control signal output and a 5-bit status signal input. Here, consider the parallel interface as a general-purpose I/O connection between the encoder and decoder.
3.2 Communication method
When using encoders and decoders to realize communication between a PC and a microcontroller, it is necessary to configure an encoder and a decoder on the PC and the microcontroller respectively to complete the sending and receiving of data signals. Since MC145026/MC145027 can complete the sending or receiving of 4-bit binary data information at a time, and computers often use data in bytes, it is necessary to divide 1 byte into high nibble and low nibble into 2 Send or receive times. Figure 2 is its communication schematic diagram.
The address of the encoder MC145026 in the figure is the address of the receiver, which can be set by software through the parallel interface. Therefore, each transmitter can have multiple (this device uses 4 address bits, so there can be 2 4 = 16) receivers to respond to it. The address of the decoder MC145027 is also the address of the local machine, which is set by the hardware component micro switch group DIP. The address of the decoder MC145027 determines the communication address of the local machine. It is unique for each microcomputer, so it can only receive information containing the local machine address.
On the interface between the microcomputer and the encoder, the high 4 bits DATA4~DATA7 of the printer parallel interface data line configured with the microcomputer can be directly connected to the D6~D9 data input lines of the encoder, and the INIT control line is used to connect the encoder data Send allows pins to be connected. Since the encoder address bits are 5 bits, and the parallel interface data output register is 8 bits, only 4 address bits can be used. This is why the A0 pin of the encoder MC145026 in this device is connected to high level (the decoder MC145027 A0 pin should also be connected to high level). When sending data, the microcomputer writes half a byte of address information to the lower 4 bits of the parallel interface data output register, then writes half a byte of data information to the upper 4 bits, and then writes the control output register to Make the INIT signal low level, thus completing the output of 4-bit data.
On the interface connection between the microcomputer and the decoder, the status lines ACK, ERROR, PE, and SLCT of the parallel interface should be connected to the data lines D6~D9 of the decoder respectively, so that the microcomputer can read the decoder output through the status lines. data, and use the status line BUSY to connect to the data output valid pin VT of the decoder, so that the microcomputer can check whether the status bit BUSY in the parallel interface status register is high level to check whether the decoder is currently receiving Whether the incoming data is valid and get the data received by the decoder.
4 Main parameters of the system
The modules that control the baud rate in this system mainly include the codec chip MC145026/MC145027 and the long-wave transceiver module T630/T631. The carrier frequency of the long-wave transceiver module is 150kHz, so it is not a major constraint. The maximum data transmission rate of the codec chip MC145026/MC145027 is 6400b/s.
When used together, the codec chip MC145026/MC145027 requires that the clocks of the two are basically the same, but this requirement is not very strict. The relationship between the external resistance and capacitance and the oscillation frequency is as listed in Table 1.
Table 1 Relationship between external resistors and capacitors and oscillator frequency
fosc/kHz | Rtc/kΩ | Rs/kΩ | R1/kΩ | C1 | R2/kΩ | C2 |
262 | 10 | 20 | 10 | 470 | 100 | 910 |
181 | 10 | 20 | 10 | 910 | 100 | 1800 |
88.7 | 10 | 20 | 10 | 2000 | 100 | 3900 |
42.6 | 10 | 20 | 10 | 3900 | 100 | 7500 |
21.5 | 10 | 20 | 10 | 8200 | 100 | 15×10 3 |
8.53 | 10 | 20 | 10 | 2×10 4 | 200 | 2×10 4 |
1.71 | 50 | 100 | 50 | 2×10 4 | 200 | 10 5 |
5 Conclusion
This device overcomes the problem of mutual interference during multi-machine wireless communication, so the communication reliability is high, and can be used in communication systems, alarm systems, data acquisition systems, LED large-screen display systems, remote control systems and other fields. In terms of the interface with the microcomputer, this device cleverly utilizes the parallel interface of the microcomputer printer, so it is very simple, convenient and easy to implement.
Previous article:Simplified interface for communication between microcontroller and PC
Next article:CPLD implementation of I2C bus communication interface
- 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
- GSA: The number of 5G devices exceeds 600
- The live broadcast entrance is now open | Infineon BMS solutions protect electric vehicles and energy storage systems!
- Long loading time for ALTERA CYCLONE II and CYCLONE III
- Review summary: Chuanglong TL570x-EVM is here, TI AM5708 industrial board
- 【TI recommended course】#Consumer electronics application and design seminar#
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board]——6. Digital tube display clock (hour, minute, second)
- Advantages and disadvantages of totem pole compared to single transistor driver
- RT-thread studio hardware timer counting issue
- Highly recommend a good introductory book on digital signal processing
- python3,snake