Linux Driver Development IV (the serial port of hardware knowledge that must be understood)
In the previous article, we understand the processor, memory, in this article Lao Xie want to chat with you in the actual project development process of the basic knowledge and role of the serial port.
First, the introduction of the serial port
If you want to understand the definition of the serial port very carefully, ask the mother directly is the fastest way. Lao Xie will not dwell on it here. This is described in general:
- RS-232 protocol, compared to rs-422,rs-285 has a wider range of applications, especially in the embedded development process, the application is very broad, is the eyes of engineers. Engineers rely on the UART tool to understand the system's operating status, debugging and processing related issues, and this series of information interaction is inseparable from the serial port of the "eyes."
- The serial port is basically divided into 9pin type and 25pin type, this is the standard serial interface definition, as shown in:
The standard serial pin PIN defines DB9 and DB25 pairs such as the following table:
- However, in the actual project development process, the standard serial port application has been fewer and less. Now it is almost impossible to see the serial port on the laptop. Therefore, in the modern embedded development process, the application of USB to UART is more popular. is a typical circuit diagram of the Usb2uart tool. The application of PL2303 is indeed very extensive. To use the goods, we also need to load the PL2303 driver on the PC, which is free to download on the network.
Do not know if you have noticed that in this application, in fact, Txd, RXD, GND signal is used.
Second, the application of serial port in the actual project development
Old Xie most like to use is the Windows comes with (Win7 already did not bring, but can download on-line) HyperTerminal Hypertrm. Of course, radish sauerkraut each their own, there are other serial tools are also very good.
Take Hypertrm as an example, the following parameters to set the serial port, baud rate, data flow control and so on, you can start using the serial tool.
The results show that, you can see the log information you want to see, of course, you can also command to control the corresponding platform.
Three, randomly grasping a few txd/rxd waveform
RXD
TXD
TXD Expand
Itxiebo
20160506
Linux Driver Development IV (the serial port of hardware knowledge that must be understood)