Recent from talks
Nothing was collected or created yet.
COM (hardware interface)
View on Wikipedia
COM (communication port)[1][2] is the original, yet still common, name of the serial port interface on PC-compatible computers. It can refer not only to physical ports, but also to emulated ports, such as ports created by Bluetooth or USB adapters.
History
[edit]The name for the COM port started with the original IBM PC. IBM had called the four well-defined communication RS-232 ports the "COM" ports, starting from COM1 through COM4. In BASICA and PC DOS you can open these ports as "COM1:" through "COM4:", and all PC compatibles using MS-DOS used the same denotation.[citation needed] Most PC-compatible computers in the 1980s and 1990s had one or two COM ports.
By 2007, most computers shipped with only one or no physical COM ports. Today, few consumer-grade PC-compatible computers include COM ports,[3] though some of them do still include a COM header on the motherboard.[4]
After the RS-232 COM port was removed from most consumer-grade computers, various adapters from various remaining interfaces such as PCI Express and USB can be used to install a COM port. A major supplier chips for external USB-to-UART serial adapter cables is FTDI.[citation needed]
I/O addresses
[edit]The COM ports are interfaced by an integrated circuit such as 16550 UART. This IC has seven internal 8-bit registers which hold information and configuration data about which data is to be sent or was received, the baud rate, interrupt configuration and more. In the case of COM1, these registers can be accessed by writing to or reading from the I/O addresses 0x3F8 to 0x3FF.
If the CPU, for example, wants to send information out on COM1, it writes to I/O port 0x3F8, as this I/O port is "connected" to the UART IC register which holds the information that is to be sent out.
| Designation | I/O port | IRQ |
|---|---|---|
| COM1 | 0x3F8-0x3FF | 4 |
| COM2 | 0x2F8-0x2FF | 3 |
| COM3 | 0x3E8-0x3EF | 4 |
| COM4 | 0x2E8-0x2EF | 3 |
Implementations
[edit]See also
[edit]References
[edit]- ^ "Configuring a communication port". IBM Lotus Domino and Notes Information Center. August 14, 2008. Archived from the original on 17 September 2013.
- ^ Stephen Byron Cooper. "What Is a Com1 Port?". Retrieved 2021-09-30.
- ^ "Serial port". Retrieved 2020-09-14.
- ^ "Motherboard Port Guide: Solving Your Connector Mystery". Retrieved 2020-09-14.
- ^ "22.2.3. Resources Required by Serial Ports - PC Hardware in a Nutshell, 3rd Edition [Book]". www.oreilly.com. Retrieved 2024-10-15.
Further reading
[edit]- Serial Port Complete: COM Ports, USB Virtual COM Ports, and Ports for Embedded Systems; 2nd Edition; Jan Axelson; Lakeview Research; 380 pages; 2007; ISBN 978-1-931-44806-2.
External links
[edit]- How to Interface Hardware in COM ports at the Wayback Machine (archived 2017-09-13)
COM (hardware interface)
View on GrokipediaFundamentals
Definition and Purpose
A COM port refers to the original designation for RS-232 serial ports on PC-compatible systems, typically labeled as COM1 through COM4 to identify up to four such interfaces available on standard IBM PC architecture.[5] These ports serve as input/output interfaces for asynchronous serial communication, transmitting data sequentially one bit at a time over a single channel, in contrast to parallel transmission methods.[6] The RS-232 standard defines the electrical characteristics for this signaling, enabling reliable point-to-point connections between the computer and external devices.[7] The primary purpose of COM ports is to facilitate low-speed data transfer, typically up to 115.2 kbit/s, for connecting peripherals such as modems for dial-up networking, serial mice for input, dot-matrix printers for output, and industrial equipment like sensors or controllers in automation systems.[6][8] This setup supports legacy compatibility in environments where simple, robust communication is prioritized over high bandwidth, distinguishing COM ports from parallel ports—which handle multiple bits simultaneously for faster but more complex transfers—and modern USB interfaces, which offer plug-and-play versatility and much higher data rates.[6] COM ports abstract the underlying hardware details, such as register configurations and interrupt handling, allowing software applications to access them through operating system device drivers that manage baud rate settings, parity checks, and data framing without requiring direct hardware manipulation.[6] This abstraction enables developers to treat COM ports as standardized communication endpoints, supporting protocols for tasks like file transfer or device control in a consistent manner across compatible systems.Underlying Standards
The RS-232 standard, originally published as EIA-232 by the Electronic Industries Alliance in 1960 and later revised to TIA/EIA-232-F by the Telecommunications Industry Association in 1997, serves as the foundational protocol for COM ports, defining the electrical, mechanical, and functional specifications for point-to-point serial communication between data terminal equipment (DTE), such as computers, and data communications equipment (DCE), such as modems.[9] This standard enables asynchronous serial transmission, where data frames consist of a start bit to synchronize the receiver, followed by data bits and optional parity for error checking, and concluded by one or more stop bits to signal the end of the frame.[7] Key electrical characteristics ensure reliable signal integrity over balanced lines. Voltage levels for a logic 1 (mark or "off" state) are specified as -5 V to -15 V when driven by the transmitter and -3 V to -15 V when received, while logic 0 (space or "on" state) uses +5 V to +15 V driven and +3 V to +15 V received, with a transition region around ±3 V considered undefined to provide noise margin.[9] Receiver input impedance must be between 3 kΩ and 7 kΩ, and the maximum voltage on any pin is limited to ±25 V to protect connected devices.[9] The standard guarantees reliable operation up to 20 kbit/s over the maximum specified cable lengths (equivalent to 2500 pF capacitance), though higher data rates are achievable in practice over shorter distances with compatible hardware.[9] Mechanical interfaces are standardized using D-subminiature connectors, primarily the 25-pin DB-25 for full RS-232 compliance and the 9-pin DB-9 (also known as DE-9) for a reduced subset in later PC implementations. The pin assignments define primary signals for data transmission, handshaking, and control.[10]DB-25 Connector Pinout (RS-232C)
| Pin | Signal | Direction (DTE) | Description |
|---|---|---|---|
| 2 | TXD | Out | Transmit Data: Serial data output from DTE to DCE. |
| 3 | RXD | In | Receive Data: Serial data input to DTE from DCE. |
| 4 | RTS | Out | Request to Send: DTE signals readiness to send data. |
| 5 | CTS | In | Clear to Send: DCE acknowledges it can receive data (hardware handshaking). |
| 6 | DSR | In | Data Set Ready: DCE indicates it is powered and ready. |
| 7 | GND | - | Signal Ground: Common reference for voltage levels. |
| 20 | DTR | Out | Data Terminal Ready: DTE indicates it is powered and ready. |
DB-9 Connector Pinout (TIA-574 Subset)
| Pin | Signal | Direction (DTE) | Description |
|---|---|---|---|
| 2 | RXD | In | Receive Data: Serial data input to DTE from DCE. |
| 3 | TXD | Out | Transmit Data: Serial data output from DTE to DCE. |
| 4 | DTR | Out | Data Terminal Ready: DTE indicates it is powered and ready. |
| 5 | GND | - | Signal Ground: Common reference for voltage levels. |
| 6 | DSR | In | Data Set Ready: DCE indicates it is powered and ready. |
| 7 | RTS | Out | Request to Send: DTE signals readiness to send data. |
| 8 | CTS | In | Clear to Send: DCE acknowledges it can receive data (hardware handshaking). |
Technical Specifications
Hardware Components
The core of COM port hardware is the Universal Asynchronous Receiver/Transmitter (UART) integrated circuit, which manages asynchronous serial data transmission and reception. Early implementations relied on the Intel 8250 UART, a single-chip device with basic single-byte buffering that supported baud rates up to 115.2 kbps but required frequent CPU intervention due to its limited capacity. This evolved with the National Semiconductor NS16450, which offered improved compatibility and performance while maintaining the same register architecture. The pivotal advancement came with the NS16550, introducing 16-byte First-In-First-Out (FIFO) buffers for both receiver and transmitter, enabling up to 16 characters to be queued and processed in bursts to significantly reduce CPU overhead during high-speed data flows.[14][15] Key UART registers facilitate precise control and data handling. The receiver buffer register (RBR) temporarily stores incoming serial data bytes before software retrieval, while the transmitter holding register (THR) latches outgoing bytes for serialization. The interrupt enable register (IER) configures interrupt sources, such as enabling alerts for received data availability (bit 0) or transmitter holding register empty (bit 1), allowing efficient polling or interrupt-driven operation without constant CPU polling. These registers, accessible via I/O ports, ensure compatibility across UART generations while the FIFO in the 16550 mitigates overruns at rates exceeding 38.4 kbps.[15][16] Motherboard integration of COM ports typically incorporates the UART alongside RS-232 transceivers, such as the MAX232, which converts low-voltage TTL/CMOS logic levels (0-5 V) to RS-232 compliant bipolar signaling (±5 to ±7 V for drivers). This transceiver uses a charge-pump circuit to generate required voltages from a single 5 V supply, enabling direct connection to serial devices. Physical interfaces include DB-9 or DB-25 D-subminiature connectors, with DB-25 adhering to the original EIA RS-232 standard for 25 pins (though only 9 are essential for basic communication) and DB-9 as a compact 9-pin variant adopted in PCs for space efficiency. For systems lacking onboard ports, add-on cards utilize legacy ISA slots (8-bit or 16-bit bus) or PCI slots (32-bit, up to 33 MHz), providing expandable COM functionality with bracket-mounted connectors.[17][18] Signal conditioning circuits, including line drivers and receivers, are integral for reliable operation. These components shift voltage levels between UART logic and RS-232 standards while incorporating protection against electrostatic discharge (ESD), often rated up to ±15 kV per the human body model to safeguard against static events in connected cables. In modern low-voltage designs, transceivers like the ADM3232E support 3.3 V operation with integrated ESD diodes and Schmitt triggers for noise immunity. Power requirements emphasize efficiency, with UARTs and transceivers operating at 3.3 V or 5 V supplies and consuming typically 3 mA in active mode, resulting in negligible heat dissipation (under 50 mW) even in densely packed motherboard implementations.[19][20]I/O Addressing and Interrupts
In IBM PC-compatible systems, serial ports known as COM ports are assigned specific ranges within the I/O address space to interface with the UART chip, typically occupying contiguous 8-byte blocks that map to the device's control and data registers. The standard assignments are COM1 at 0x3F8–0x3FF, COM2 at 0x2F8–0x2FF, COM3 at 0x3E8–0x3EF, and COM4 at 0x2E8–0x2EF, as defined in legacy hardware specifications for compatibility with the 8250/16450/16550 UART family.[21][22] These addresses allow direct memory-mapped I/O access from the CPU, enabling low-level operations such as reading received data or writing transmit bytes without involving higher-level drivers. Interrupt requests (IRQs) are allocated to COM ports to signal the CPU asynchronously for events like data reception or transmission completion, with default assignments of IRQ4 for COM1 and COM3, and IRQ3 for COM2 and COM4 in standard PC configurations.[23] In early PC systems with limited IRQ lines (only 8 available via the 8259 PIC), this led to sharing issues where multiple ports on the same IRQ (e.g., COM1 and COM3 both on IRQ4) required software polling of the Line Status Register to determine the source, potentially causing performance bottlenecks in multi-port setups.[23] Configuration of these IRQs and I/O addresses was originally handled via hardware jumpers on expansion cards or BIOS setup menus, allowing system integrators to reassign resources to avoid conflicts with other peripherals like hard drives or printers.[24] Access to the UART registers occurs through these I/O ports, with the 16550 UART providing an 8-register map accessed via offsets 0–7 from the base address, where registers such as the divisor latches are selected by configuration bits like the Divisor Latch Access Bit (DLAB) in the Line Control Register, and the scratch register is at offset 7. The primary registers include the Receiver Buffer Register/Transmit Holding Register at offset 0, Interrupt Enable Register at 1, Interrupt Identification Register/FIFO Control Register at 2, Line Control Register at 3, Modem Control Register at 4, Line Status Register at 5, and Modem Status Register at 6, while offset 7 holds the Scratch Register. To configure baud rates, the Divisor Latch Access Bit (DLAB) in the Line Control Register is set to 1, latching the 16-bit divisor into offsets 0 (DLL) and 1 (DLM), where the divisor value is calculated as 115200 divided by the desired baud rate (e.g., 12 for 9600 baud). This setup supports standard rates like 9600, 19200, and 115200 bps by programming the divisor prior to enabling interrupts or data flow. Resource conflicts, such as overlapping I/O addresses or shared IRQs, were common in legacy systems and could manifest as lost data or system hangs; resolution involved reconfiguring via BIOS settings to remap addresses and IRQs during boot or using hardware jumpers on multiport cards.[24] In MS-DOS environments, the MODE command primarily configures runtime parameters like baud rate, parity, and stop bits for a specified COM port (e.g., MODE COM1:96,N,8,1), but address and IRQ remapping required external tools or hardware changes.[25] Under modern Windows systems, Device Manager facilitates reconfiguration by viewing and adjusting resource assignments in the device's Properties dialog under the Resources tab, allowing manual selection of alternative I/O ranges or IRQs to resolve conflicts without rebooting.[26]| COM Port | I/O Address Range | Default IRQ |
|---|---|---|
| COM1 | 0x3F8–0x3FF | 4 |
| COM2 | 0x2F8–0x2FF | 3 |
| COM3 | 0x3E8–0x3EF | 4 |
| COM4 | 0x2E8–0x2EF | 3 |
