Current location - Quotes Website - Team slogan - How to assign serial ports to gps module and gsm module?
How to assign serial ports to gps module and gsm module?
Both STC5 1 and c805 1f have single-chip computers with dual serial ports.

Depending on your application, you can use a serial port. When you choose STC, you don't need to add hardware. Generally, 5 1 needs to add a switch chip to control the serial port to connect gps or GSM.

The serial port of STC microcontroller can be set at P3 port or P 1 port.

If you use STC

Assume that P3 serial port pin is connected to GPS and P 1 serial port pin is connected to GSM.

Normally, the serial port is always set at P3, after processing gps data, it is set at P 1, and after sending data, it is set at P3.