什么是串口(What is serial port)
什么是串口(What is serial port)
A thousand miles. All men are mortal., according to retain loyalty. To cross the Yellow River ice jam Sichuan, will climb the Taihang mountains snow mountain. Send Italy when Tsuen not observed, I in my blade heart. All rivers run into sea, tolerance is a precipice, One can be austere without selfish desires. COM port pin definitions
COM communication interface, commonly known as the serial port, but also the professional name RS-232. (including the RS-232 port range is very wide, the COM is only one form) COM port is usually 9 pin, Lenovo used in consumer and commercial computer, there are 25 pin interface. The definition of COM port each pin can query in other FAQ. However, the function and the use of various definitions of the meaning but can make nothing of it and share:
The 9 core signal direction from an abbreviated description (function).
1 modem DCD (aka CD) carrier detection
2 modem RXD receive data
3 PC TXD to send data
4 PC DTR data terminal ready
The 5 GND signal wire
6 DSR modem communication equipment ready
7 PC RTS request
8 modem CTS allows to send (clear to send)
9 modem RI ringing bell indicator (vibration)
In COM there is a female head is a slot type, although the form is not the same, but the pin definition is the same (more detail below)
What is the serial?
------------------------------------------
Serial port is a very common device communication protocol on the computer (not with the universal serial bus Universal Serial Bus or USB confusion). Most computer contains two serial interface based on RS232. The serial communication protocol instrumentation equipment is also common; many GPIB devices compatible with RS232 port. At the same time, serial communication protocol can be used to access remote data acquisition equipment.
The concept is very simple serial communication, serial by bit (bit) to send and receive bytes. Although the ratio of bytes (byte) parallel communication is slow, but the serial port can receive data from another line in the use of a line to send data at the same time. It is very simple and can achieve long-distance communication. For example, the definition of IEEE488 parallel access mode, the total line often provides
equipment shall not be more than 20 meters, and between any two devices should not exceed 2 meters; and for the serial port, up to 1200 meters in length.
Typically, the serial code for the ASCII character transmission. 3 lines of communication to use: (1) wire, (2) sending, receiving (3). Due to the asynchronous serial communication port to send data in a line at the same time another line to receive data. The other line for the handshake, but not necessary. The most important parameters of serial
communication baud rate, data bits, stop bits and parity. For the two access port, these parameters must match:
The baud rate (a): This is a measure of the speed of communication parameters. It is said that the number of transmitted per second bit. For example, Potter said 300 packets per second 300 bit. When we mentioned the clock cycle, we mean the baud rate for example if the protocol requires 4800 baud rate, so the clock is 4800Hz. This means that the serial communication in data line to the sampling rate of 4800Hz. Usually the phone line for the baud rate 1440028800 and 36600. The baud rate can be much greater than these values, but the baud rate and inversely proportional to the distance. High baud rate is often used to close the communication instrument placed between communication, a typical example is the GPIB device.
(b) data: This is a measure of the actual parameter bits of data communication. When a computer information packet, the actual data is not 8, the standard value is 5, 7 and 8. How to set depends on the information you want to send. For example, the standard ASCII code is 0 ~ 127 (7). Extended ASCII code is 0
~ 255 (8). If the data using a simple text (ASCII code), then each data packet using a 7 bit data. Each packet is a byte,
Including the start / stop bit, data bits and the parity bit. Because the actual data depends on the selection of communication protocol, the term "package" refers to any communication situation.
(c) stop: said last for a single package. The typical value is 1, 1.5 and 2. Because the data is in the transmission line timing, and each device has its own clock, probably between two devices in communication are out of sync and small. So stop is not only the end of said transmission, and provide opportunities for computer clock synchronization correction. Apply to stop more bits, the tolerance of different clock synchronization is bigger, but the data transmission rate is also slower.
(d) parity: serial communication in a simple way of checking. There are four kinds of error: even and odd, high and low. Of course, no parity bit is possible. For even and odd parity conditions, the serial port will set the parity bit (a bit later), with a value to ensure data transmission even or odd logic high. For example, if the data is 011, then the even parity, the parity bit is 0, which is even a high number of logic. If odd parity, parity bit 1, so there is a logic high 3. High and low not real check data, a simple logic high or low logic check. This makes the receiving device can know a bit, have the opportunity to determine whether there is noise or whether the communication transmitting and receiving data is not synchronized.
What is the RS-232?
------------------------------------------
RS-232 (ANSI/EIA-232) is IBM-PC and its compatible computer serial connection standard. Can be used for many purposes, such as connecting the mouse, printer or Modem, also can be connected with the industrial instrumentation. To improve the connection drive, RS-232 practical application of the transmission length or speed is often more than the standard value. Only RS-232 and PC serial point-to-point communications between devices. RS- 232 serial communication distance is 50 feet.
-DB-9 pin connector
-
12345 \ /
6789 / -\
At
Even the line section from the computer.
RS-232 pin function:
Data:
TXD (pin 3): serial data output
RXD (pin 2): serial data input
Handshake:
RTS (pin 7): send data requests
CTS (pin 8): clear to send
DSR (pin 6): data ready to send
DCD (pin 1): data carrier detection
DTR (pin 4): data terminal ready
Ground:
GND (pin 5): Ground
Other
RI (pin 9): Bell indicator
Note:
The physical interface is based on RS232 standard COM port.
COM refers to the serial physical implementation, while RS232
is a serial interface standard.
com interface
------------------------------------------
COM refers to the Component Object interface Mode interface, is a standard interface defined by Microsoft.
Serial called serial interface, PC now has two common serial port COM 1 and COM 2. The serial port is different from the parallel port lies in the data and control information it is one by one to send. Although this will be slower, but the transmission distance is longer in parallel, so if you want long distance communication, should use the serial port. Usually COM 1 using the 9 pin D connector, also known as the RS-232 interface, and some are using DB25 COM 2 pin connector vintage, also known as the RS-422 interface, this interface is now rarely used.
Lack of learning and knowledge, to teach and know the difficulties. Sunrise flaming red flowers, spring green river, such as blue. Homesick Bu Yueqing Xiao Li, Yi brother see cloud day sleep. Lose at sunrise and gain at sunset。 In the past,
a symbol of war in ancient China, swallowing air miles like a tiger.