“COM"、“USB"、“串口"有什么区别? [英] What's the difference between "COM", "USB", "Serial Port"?

查看:29
本文介绍了“COM"、“USB"、“串口"有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这三个概念感到困惑.

I am confused about the these 3 concepts.

我的理解是,Serial Port 通常表示 RS-232 兼容端口(RS = 推荐标准).USB 代表通用串行总线.所以它的名字包含串口,它支持RS-232吗?通用是什么意思?

My understanding is, Serial Port usually means RS-232 compatible port (RS = Recommended Standard). USB stands for Universal Serial Bus. So its name contains serial port, does it support RS-232? What does the Universal mean?

COM 端口是什么意思?

And what does COM port mean?

从汉斯的回答中得到一些理解:

Some understanding from Hans' answer:

为了减少工作量,设备制造商通常使他们的设备也可以像串口设备一样工作.这依赖于许多操作系统和语言库已经包含串行端口通信支持的事实.虽然这样的支持比不上真正的匹配设备驱动程序.

To reduce effort, device manufacturers usually make their device can behave like a serial port device as well. This relies on the the fact that many OS and language libraries have already included serial port communication support. Though such support is no comparable to a real matching device driver.

关于Serial Port HOW-TO 的良好参考文档.

A good reference doc about Serial Port HOW-TO.

顺便说一句,Linux 文档项目 真的很有用.

And btw, the Linux Document Project is really useful.

推荐答案

串口是一种使用UART芯片的设备,通用异步收发器.在过去连接计算机的两种基本方式之一,并行端口是另一种方式.串口连接起来很简单,不需要很多电线.如果您想快速运行,并行非常有用,通常比串行快 8 倍,但电缆和连接器很昂贵.并行 I/O 已经从计算机设计中完全消失,赶上了总线收发器的巨大进步,这种芯片可以通过电线传输电信号.

Serial port is a type of device that uses an UART chip, a Universal Asynchronous Receiver Transmitter. One of the two basic ways to interface a computer in the olden days, parallel ports were the other way. Serial is simple to hook up, it doesn't need a lot of wires. Parallel was useful if you wanted to go fast, typ 8 times faster than serial, but cables and connectors were expensive. Parallel I/O has completely disappeared from computer designs, caught up by tremendous advances in bus transceivers, the kind of chip that can transmit an electrical signal down a wire.

COM来自MS-Dos,它是一个设备名称.通讯端口"的缩写.1980 年代的计算机通常有两个串行端口,在机器背面标有 COM1 和 COM2.这个名称被带到 Windows 中,大多数模拟串行端口的驱动程序都会创建一个名称中带有COM"的设备.LPT 是并行端口的设备名称,是Line Printer"的缩写.

COM comes from MS-Dos, it is a device name. Short for "COMmunication port". Computers in the 1980's usually had two serial ports, labeled COM1 and COM2 on the back of the machine. This name was carried forward into Windows, most any driver that simulates a serial port will create a device with "COM" in its name. LPT was the device name for parallel ports, short for "Line PrinTer".

RS-232 是串行端口的电气信号标准.它是最简单的一种,对设备的要求非常低,仅支持点对点连接.RS-422 和 RS-485 并不少见,它们对每个信号使用双绞线,提供更高的抗噪性并允许多个设备相互连接.

RS-232 was an electrical signaling standard for serial ports. It is the simplest one with very low demands on the device, supporting just a point-to-point connection. RS-422 and RS-485 were not uncommon, using a twisted pair for each signal, providing much higher noise immunity and allowing multiple devices connected to each other.

USB 表示通用串行总线.能够将微处理器集成到尺寸仅为几毫米且成本仅为几角钱的设备中.它在 1990 年代后期取代了旧设备.它是通用的,因为它可以支持许多不同类型的设备,从咖啡壶加热器到磁盘驱动器到 wifi 适配器到音频播放.它是串行的,它只需要 4 根线.它是一个总线,您可以将 USB 设备插入任意端口.它与 FireWire 竞争,这是一种非常相似的方法,由 Apple 支持,但以压倒性优势获胜.

USB means Universal Serial Bus. Empowered by the ability to integrate a micro-processor into devices that's a few millimeters in size and costs a few dimes. It replaced legacy devices in the latter 1990s. It is Universal because it can support many different kinds of devices, from coffee-pot warmers to disk drives to wifi adapters to audio playback. It is Serial, it only requires 4 wires. And it is a Bus, you can plug a USB device into an arbitrary port. It competed with FireWire, a very similar approach and championed by Apple, but won by a land-slide.

如今,串行端口仍然适用于 Windows 的唯一原因是 USB 设备需要自定义设备驱动程序.设备制造商喜欢编写和支持驱动程序,他们经常在驱动程序中采取捷径,使其模拟传统的串行端口设备.因此,程序员可以使用对内置于操作系统和任何语言运行时库的串行端口的遗留支持.顺便说一句,相当不完善的支持,这些模拟器从不支持即插即用.发现要打开的特定串行端口非常困难.当您在程序使用 USB 设备时猛拉 USB 设备时,这些驱动程序通常会出现无法诊断的错误行为.

The only reason that serial ports are still relevant in on Windows these days is because a USB device requires a custom device driver. Device manufacturers do not like writing and supporting drivers, they often take a shortcut in their driver that makes it emulate a legacy serial port device. So programmers can use the legacy support for serial ports built into the operating system and about any language runtime library. Rather imperfect support btw, these emulators never support plug-and-play well. Discovering the specific serial port to open is very difficult. And these drivers often misbehave in impossible to diagnose ways when you jerk a USB device while your program is using it.

这篇关于“COM"、“USB"、“串口"有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆