The basic way of data communication can be divided into two kinds of parallel communication and serial communication: Parallel communication: Refers to the use of multiple data transmission lines to send a data to each of you simultaneously. It is characterized by fast transmission speed, suitable for short-distance communication, but requires high communication rate applications. Serial communication: Refers to the use of a transmission line to transmit data in a single bit order. Characterized by simple communication lines, the use of simple cable to achieve communication, reduce costs, suitable for long-range communication, but slow transmission of applications. I. Asynchronous communication and its Protocols Asynchronous communication takes one character as the transmission unit, and the time interval between the two characters in the communication is not fixed, whereas the time interval between the two adjacent bit codes in the same character is fixed. Communication Protocol (Communication Regulations): refers to the communication between the two parties agreed to some rules. In the use of asynchronous serial port to transmit a character information, the data format has the following conventions: the provision of idle bit, start bit, data bit, parity bit, stop bit. The timing of the asynchronous communication, as shown in Figure 5-1.
The meanings of these members are as follows: starting bit: A logic "0" signal is first emitted to indicate the beginning of the transmission character. Data Level: Immediately after the start bit. The number of data bits can be 4, 5, 6, 7, 8, and so on, constituting a character. ASCII code is usually used. Start from the lowest bit and position by the clock. parity bit: After the data bit is added, the number of "1" should be even (even) or odd (parity), so as to verify the correctness of the data transmission. Stop Bit: It is the end of a character data flag. Can be a 1-bit, 1.5-bit, 2-bit high level. Idle bit: In the logical "1" state, indicates that there is no data transfer on the current line. baud rate: A pointer to the data transfer rate. Represents the number of bits transmitted per second. For example, the data transfer rate is 120 characters per second, and each character is 10 bits, the baud rate transmitted is 10x120=1200 characters per second =1200 baud. Note: Asynchronous communication is transmitted by character, and the receiving device receives the starting signal as long as it is in sync with the sending device during the transmission time of one character. The arrival of the starting bit of the next character also enables synchronous recalibration (relying on the detection of the starting bit to achieve the self-synchronizing of the sending and receiving clocks). Ii. Information Transmission methods There are three ways to vary the direction of data transmission. As shown in Figure 5-2. |
1. Simplex mode Data is always sent from device A to device B. 2, half duplex mode Data can be transferred from a device to a B device, or from a B device to a device. Data cannot be transmitted in two directions at any time, i.e. only one device can be sent at a time, and the other device will receive it. But the communication between the two parties in accordance with a certain communication protocol to send and receive in turn. 3, Full duplex mode Allow both sides of the communication to send and receive simultaneously. At this time, a device in the transmission can also receive, B equipment is also the same. The full duplex method is equivalent to combining two opposite single-way, so it requires two data transmission lines. In computer serial communication, the main use is half-duplex and full duplex. Third, signal transmission mode 1, Baseband transmission mode Transmit the non-modulated binary signal directly on the transmission line, as shown in the figure. It requires a wide band of transmission lines, and the transmitted digital signal is a rectangular wave. Baseband transmission is only suitable for short-distance and low-speed communication.
2. Frequency band transmission mode Transmission of modulated analog signals In the long distance communication, the sender will use the modulator to convert the digital signal into an analog signal, and the receiver uses the demodulator to convert the received analog signal into a digital signal, which is the modulation and demodulation of the signal. The device that implements the modulation and demodulation tasks is called a modem. When using the frequency band transmission, each side of the communication is connected to a modem, and the digital signal is sent to the analog signal (carrier) for transmission. Therefore, this transmission is also known as the carrier transmission mode. At this point the communication line can be a telephone exchange network, can also be a dedicated. There are three types of modulation methods commonly used: Amplitude modulation, frequency modulation and phase modulation, respectively, as shown in the figure below.
|