Current location - Education and Training Encyclopedia - Graduation thesis - How to realize the serial communication circuit and GPRS communication circuit of STM32F 103 single chip microcomputer?
How to realize the serial communication circuit and GPRS communication circuit of STM32F 103 single chip microcomputer?
To realize serial communication between MCU module and equipment module, the two sides need to be connected correctly first. Asynchronous serial communication is a very common interconnection method between modules. Generally, the same three connecting lines are marked as Tx (or TxD), Rx (or RxD) and GND respectively. Where Tx is used for data transmission and is an output signal; Rx is used for data reception, that is, the input signal, and GND is the common ground.

Usart 1 _ rx in the theme map 1 indicates the data receiving end of single chip microcomputer, which should be connected with GSM_TxD in figure 2, while ∪SART 1_Tx in figure1indicates the data sending end of single chip microcomputer, which should be connected with GSM_RxD in figure 2. Then the software work. Both parties shall agree on the consistent communication parameters (such as baud rate, data bits, check bits, stop bits, etc.). ), write a serial port setting program at one end of the single chip microcomputer, and write a control program according to the command set and command format of GSM module.

It should be noted that the common level standards of asynchronous serial communication interface are RS232 and TTL, RS232 is used for long-distance connection and TTL is used for short-distance connection. The two cannot be directly related to each other. If you need to connect, you must first convert to the peer standard. Single chip microcomputer pin: the signal is TTL standard, and the serial port level of outsourced module is related to the module manufacturer and module model, so you need to check the technical documentation of the module.