There are basically two types of interfaces between microcomputer host and external devices: serial interface and parallel interface. Parallel interface refers to the simultaneous transmission of data bits, which is characterized by high transmission speed. However, when the transmission distance is long and the number of bits is large, the communication line is complicated and the cost increases. Serial communication refers to the sequential transmission of data bit by bit, which is characterized by simple communication lines, two-way communication as long as a pair of transmission lines can be realized, and telephone lines can be used, which greatly reduces the cost, and is especially suitable for long-distance communication, but the transmission speed is slow. Serial communication itself is divided into asynchronous communication and synchronous communication. Digital signals are transmitted on serial communication lines, and the index of the ability to transmit digital signals is the data rate, and its unit is bps (bits per second), that is, the number of bits transmitted per second. Serial interface standard: At present, a common serial interface standard is RS-232-C standard. RS-232-C interface standard adopts 25-pin connector (D socket). Rs-232-c stipulates that there are 25 wires.
parallel interface
The interface between microcomputer and external equipment that uses parallel transmission to transmit data is called parallel interface, which has two main characteristics; First, the number of bits transmitted in parallel at the same time is the data width; Secondly, the response contact signal is used between the computer and the peripheral to coordinate the data transmission operation between the two sides, which is also called handshake signal.
1. Simple parallel interfaces Simple parallel interfaces are divided into 0-wire handshake parallel interfaces, 1 wire handshake parallel interfaces and 2-wire handshake parallel interfaces. 1, 0-line handshake parallel interface is called 0-line handshake (contact), that is, the interface circuit contains no contact signal to coordinate data transmission, and it is the simplest form of parallel interface, which is divided into three forms: input parallel interface, output parallel interface and input/output bidirectional parallel interface. The 0-wire handshake input interface can be directly read by using a three-state gate when the input quantity is relatively stable (the input state information does not change for a short time, such as switching input). When the output digital quantity does not need to be latched, three-state gate can be used to directly output the 0-wire handshake output interface. 0-wire bidirectional input/output interface When data bus is needed to transmit information in both directions between peripherals and CPU, I/O devices can send and receive information.
2. 1 line handshake parallel interface 1 line handshake parallel interface adds a handshake signal line to the 0-line handshake parallel interface. The handshake mode of 1 line always assumes that the data sent by the sending mode is ready and can be received by the receiver.
Secondly, there are many kinds of programmable parallel interface chips, such as Intel's 8255A(PPI), Motorola's MC6820(PIA) and Zilog's Z80-PIO.