Comparison of uart communication and various communication methods of embedded learning

1. The following are all serial communication.
All full-duplex receiving and sending have a line each, and
all synchronous ones have clock control.
Insert picture description here2. Because there is no clock control, the communication parties must carry out data communication in strict accordance with the unified baud rate.
3. Connect the chip's TXD RXD to the ch340 through a jumper cap and send it to the host computer via usb.
3. Because there is no serial port on our current computer, we generally use a USB to serial chip, with only one purpose, to map the computer's USB port to a serial port.
(1) The interface of the UART module uses TTL level, that is, the serial port is TTL level.
(2) USB is USB level. In
summary, most computers now have USB ports. If the computer uses the USB port as a serial port, It is necessary for the user to make a conversion. The drive format is ch340, otherwise the computer will only recognize it as USB, not as a serial port. Serial debugging
is impossible. 4. One-click download uses ch340, which means that the computer downloads software through simulation. The serial port sends data to the board, and then the TXD and RXD pins of ch340 communicate with the board uart, and the two pins of RTS DTR are controlled by the hardware circuit BOOT0 and RESET (BOOT1 is always 0) to achieve code download or selection Flash start execution mode.
We need to pay attention to one point: After CH340G is powered on, DTR# and RTS# are both high. When using MCUISP to program the software, we select "DTR low level reset, RTS high level into BootLoader" under the software, CH340G The pin change of the IC in actual operation is "DTR# is pulled high, RTS# is pulled low", that is, the software setting and the actual situation are negated, the opposite.

Guess you like

Origin blog.csdn.net/weixin_44142774/article/details/106570686