RS-232C specification standard interface has 25 lines (4 lines, 11 control lines, 3 timing lines, 7 spare and undefined lines), commonly used only 9:
RTS/CTS request sending/clearing sending Flow Control
Rxd/txd data transmission and receiving
DSR/DTR data terminal ready/data set ready Flow Control
DCD Data Carrier Detection
Ringing-ri ring indicator
SG signal location
The specific definition is as follows:
RTS is used to indicate that DTE requests DCE to send data. This signal is valid when the terminal sends data;
CTS is used to indicate that the DCE is ready to receive data from the DTE and is a response signal to the RTS;
Txd DTE sends the DCE of serial data through txd;
Rxd DTE receives serial data from DCE through rxd;
If the DSR is in the on status, the DCE can be used.
If DTR is in the on status, DTE can be used.
DCD when the local DCE device receives the carrier signal sent by the other party's DCE device, make the DCD valid, notify the DTE to prepare for receiving, and the DCE decrypts the received carrier signal into a digital signal, sent to DTE through rxd
Ringing-ri when the modem receives the ringing call signal sent from the switching station, this signal is valid (on status), the notification terminal, has been called
The simplest RS-232C only needs to connect the three signals rxd, txd, SG, using Xon/xoff software throttling.
I2C bus
The I2C (built-in ic) bus is a two-line serial bus developed by Philips to connect the microcontroller and its peripheral devices.
The two signals that constitute the I2C bus are the data cable SDA and the clock line SCL.
The SDA interface circuit is bidirectional. The output circuit is used to send data to the bus, and the input circuit is used to receive data on the bus.
The SCL is also bidirectional. The host that controls data transmission on the bus sends clock signals through the SCL output circuit, and checks the levels on the SCL on the bus to determine when to send the next clock pulse level.
USB Bus
The USB Bus uses a 4-core shielded wire, a pair of differential wires (D +, D-) to transmit signals, and another pair (vbus, power supply location) to transmit + 5 v dc.
USB provides four transmission modes to meet the needs of various devices:
1. Control Transmission Mode: Control
Control transmission is a bidirectional transmission with a small amount of data. It is mainly used for querying, configuring, and sending General commands to USB devices.
2. synchronous transmission mode: Synchronization
Synchronous Transmission provides a definite bandwidth and interval, which is used for stream data transmission with strict time and strong fault tolerance, or for instant applications that require a constant data transfer rate. For example, synchronous transmission is a good choice for voice service transmission.
3. interrupted transmission mode: interrupt
The interrupted transmission mode is single. For a USB host, only input is required. The interrupted transmission mode is mainly used to regularly query whether the device has interrupted data to be transmitted, this transmission method is applicable to a small amount of scattered and unpredictable data transmission scenarios, such as keyboards, game poles, and mouse.
4. batch transmission mode: Bulk
Batch transmission is mainly used to transmit and receive a large amount of data without bandwidth and interval requirements. It ensures transmission. Both printers and scanners use this transmission type.
Serial supplement: http://topic.csdn.net/u/20070508/16/5cb438ce-acf6-4089-9b20-696ab3cc8402.html
After reading it for half a day, I finally figured it out on my board and wrote it down:
Thesaviour is correct: Do not cross the line according to your use!
1. There are: crossover and direct connection! Measure with A multimeter. If the two ends of the line are 2-2, 3-3, it is directly connected. If the two ends are 2-3, 3-2, it is the cross line!
2. There are two different types of Serial Line: Public-mother and mother-mother. There is no public-public, because the pc com is the public header! (I haven't seen a parent, huh, huh)
Note: For Beginners, the public head has a needle and the mother head has a slot!
3. PC serial port is set to A. one end of the serial port connection to the PC is defined as B, the other end is defined as C, and the interface connected to 232 is defined as D!
A's head, and B's head is set! C d is customized based on the board or line.
4. Questions about whether to cross
That is, the connection between D and 232.
If cross line is used, then r1in (232 of the hair) -- 2 line (D of rxd), T1OUT--3 line (D of txd );
If you are using a straight line, opposite to the top, that is, the R1IN--3 line (D), the T1OUT--2 line (d )!
5. There are too many things mentioned above, which may be a bit confusing and easy to understand. If you just want to apply it right away, it is very simple:
Use A multimeter: as long as the 232 r1in is connected to line 3 (B) and line t1out is connected to line 2 (B), the connection is correct! Use it!
(Pay attention to connecting the five-pin grounding)
6. Note:
Make sure that your hardware is correct. For example, my board: DB9 was supposed to be welded to a mother's head, but it was welded to a public head! How to check for errors? It's very easy. After welding, 12345 is changed to 54321. Haha, you will know the wrong welding head after testing (five feet!
7. I said in other posts: "There is only one definition of the serial port: 2 is receiving, 3 is sending, and 5 is local ."
This sentence is very correct. You don't need to consider the public header. As long as 2 is the receiving foot, 3 is the sending foot, and 5 is the ground!
All right, let's talk about this. I have all passed the tests and there is no problem. If you don't believe it, you can test it!