先决条件——计算机中的端口介绍
1. 串口:
串口是用于连接串行线以实现串行通信的接口。这些端口可以对接一个连接传输线的9针D形连接器,称为DB-9连接器。通过单线获得的串行通信,只有单一的数据流从一端传输到另一端。因此,与并行传输一样,在串行传输中数据速度不匹配不是问题。电线的长度可以根据需要增加。
与并口传输速度相比,串口的传输速度相对较低。串行端口通常在调制解调器、连接设备、控制器、鼠标以及安全摄像头中实现。 DB-9 针连接器示意图如下。
2. 并口:
与串行端口不同,并行端口可以在 8 条不同的线上一次移动一组 8 位。这就是为什么它比串行通信更快的原因。与串口不同,它使用一个 25 针连接器,称为 DB-25 连接器。为了消除串扰和错误,所有比特流都需要在并行通信中以相同的速度传输数据。但是,这是不切实际的。因此,出于这个原因,在并行通信中,传输线最好是短的。
并行端口通常在 zip 驱动器、打印机、硬盘驱动器、CD-ROM 驱动器等中实现。DB-25 引脚连接器图如下所示。
串口与并口的区别:
S.NO | Serial Port | Parallel Port |
---|---|---|
1. | Serial port is used to achieve serial transmission. | While parallel port is used to achieve parallel transmission. |
2. | The transmission speed of serial port is comparatively low as compared to parallel port transmission speed. | While transmission speed of parallel port is higher than serial port transmission speed. |
3. | In serial port communication less number of wires are used. | While in parallel port communication more number of wires are used as compared to serial port. |
4. | A serial port is capable of delivering the single stream of data. | While a parallel port is capable of delivering multiple streams of data. |
5. | Serial port send a bit after another bite at a time. | While parallel ports send multiple bits at once. |
6. | In a serial port, male ports are involved. | While in a parallel port, female ports are involved. |
7. | Serial ports are typically implemented in modems, connecting devices, security cameras and controllers. | Parallel ports are typically implemented in zip-drives, printers, hard drives, CD-ROM drives, etc. |