With the rapid development of modern communication technology, many application fields adopt wireless communication mode for data transmission. The circuit composed of encoding and decoding chips PT2262 and PT2272 is widely used in various wireless remote controls, wireless alarms, toys and other small electrical devices due to its small size, low power consumption, strong function and low cost. However, this kind of circuit is rarely used in the communication of multi byte data, which has some limitations. This paper mainly introduces how to use 433 MHz high frequency transmitting module and receiving module to make multi machine wireless short message communication in ASCII format. Based on the 433MHz high frequency transmitting module and receiving module, the wireless transmission protocol is defined to realize the multi byte data communication between any two computers.

  Design of host circuit

Due to the large amount of programs involved in the system, the storage capacity of flash program memory should not be too small; The EEPROM data memory module is used to store the transmitted and received short messages. The contents stored in the EEPROM data memory will not be lost when the power is off; Receiving and decoding need the function of capturing and comparing pulse width, and the module of capturing / comparing / pulse width modulation is used; Independent timers are used for transmitting, receiving and clock, and the number of timers required is not less than 3. Based on the design requirements, picl6f877a chip of microchip company is used as the main controller of the system. The circuit is mainly composed of main control chip, crystal oscillation circuit and online simulation interface, as shown in Figure 2. In the design, MCLR, rb6 and RB7 are used as online simulation interfaces.

  Circuit design of multi machine wireless short distance communication system based on single chip microcomputer

  Design of transmitting and receiving circuit

433 MHz high frequency transmitting and receiving module is adopted. The 433 MHz high-frequency transmitting circuit starts to vibrate when the control pin is at a high level and transmits a constant amplitude high-frequency signal, and stops to vibrate when the control pin is at a low level. Therefore, the control pin can be used to perform ASK modulation on the high frequency circuit, which is equivalent to 100% amplitude modulation. When the receiving module receives 433 MHz equal amplitude high frequency signal, the signal pin outputs high level, otherwise it outputs low level. Therefore, the high and low level changes of the receiving signal pin will correspond to the high and low level changes of the transmitting control pin. Multiple receiving modules can receive the signal transmitted by the same transmitting module at the same time, which can realize one machine sending and multiple machines receiving at the same time. The circuit shown in Fig. 3 is the transmitting and receiving module of high frequency 433 MHz carrier. When the control pin B5 of 433 MHz high-frequency transmitting circuit is high, the transistor T1 is on, and the transmitter T2 is grounded and vibrates, and emits equal amplitude high-frequency 433 MHz signal; When the control pin B5 is at low level, the oscillation stops. Therefore, the control pin B5 can be used to perform ASK modulation on the high frequency circuit, which is equivalent to 100% amplitude modulation. When the receiving module receives 433 MHz equal amplitude high frequency signal, the signal pin will output high level to C2 port, if it does not receive 433 MHz equal amplitude high frequency signal, it will output low level. Therefore, the high and low level changes of the receiving signal pin will correspond to the high and low level changes of the transmitting control pin. For example, if the waveform shown in Figure 4 is input to B5 pin, the same waveform will appear on C2 pin of receiving module. Note that the control signals of B5 and C2 are sent by RB5 and RC2 of picl6f877a respectively.

  Circuit design of multi machine wireless short distance communication system based on single chip microcomputer

  Design of LCD peripheral control circuit

Use Nokia 3310 LCD display module. The LCD is 84 × 48 dot matrix LCD screen, one screen can display 4 × 7 (12 × 12 dot matrix) Chinese characters, or 6 × 14 (6 × 8 dot matrix) English, numbers, punctuation and other characters. The LCD is light, short and low power consumption, which is often used in mobile phone display. The LCD peripheral circuit is shown in Figure 5.

  Circuit design of multi machine wireless short distance communication system based on single chip microcomputer

In this design, the Nokia 33lo LCD is powered by 3 V. Among them, 1 pin is power pin, 6 pin is ground wire, 2 pin is SCLK, 3 pin is SDIN. The 4-pin is the data / address selection terminal, which can control the MCU to write data or command to the Nokia 3310 LCD. 5 pin is the enable end, low level is valid. 8 pin is reset end, low level is valid. 11 pin is connected to the positive stage of backlight power supply, and 12 pin is connected to the control stage of backlight power supply. 9. The 10 pin is the speaker of Nokia 3310 LCD. The sound effect of the speaker controlled by single chip microcomputer is not ideal, so the DC oscillation buzzer is used instead. In order to avoid the influence of buzzer and backlight on the LCD power supply, the buzzer and backlight are powered by 5 V power supply, which is separated from the LCD power supply.

The design method described in this paper integrates coding and decoding technology, communication protocol technology, anti-interference technology, SMS editing technology and LCD dot matrix display technology. Any two computers can send 70 ASCII character short messages to each other, and edit short messages like ordinary mobile phones. The machine can be named by the user to distinguish other machines, so as to realize one machine to one machine communication. The universal name (“WDX”) can also be used to realize one machine to many machines communication. It can store a sent SMS, a received SMS and an old SMS. The whole system has friendly human-computer interaction interface, similar to ordinary mobile phone system, with operation prompt and easy to operate. In this design, the layered protocol can easily replace the wireless communication module with other wireless modules with better performance.

Leave a Reply

Your email address will not be published. Required fields are marked *