| Episodes | 40 |
| Mentions | 51 |
| Cited here | 30 |
| First — last | #1 — #726 |
| Top guests | Werner Johansson, Kevin Cappuccio, Vincent Himpe |
| Related | bootloader · arduino · jtag · led · linux |
A serial port is an asynchronous communications interface built around a transmit line, a receive line, and a shared ground reference between the two ends.[378] It has served as the standard channel for loading programs into embedded systems, configuring and controlling test equipment, and moving diagnostic text between a device and a host computer.[570][135][383] Although native serial ports have largely disappeared from commodity desktop hardware, the interface persists through USB-to-serial converter chips and through wireless links that present themselves to the host as serial ports.[471][366][408]
Electrical interface
A functioning serial link requires a common ground between the two ends in addition to the data lines; without the shared reference, the receive and transmit pairs will not communicate at all.[378] Reversed transmit and receive lines are the other standard first-connection fault, and the error is common enough that a board can end up with the pair swapped twice and therefore work by accident.[378]
Legacy installations expose the electrical limits of the interface directly. Point-of-sale systems were built entirely on serial links running to a back office as much as twenty metres away, which brought signal amplification and attenuation problems that the later USB world did not have.[471]
At the other extreme, a low-baud-rate serial port can be kept running at roughly one microamp of current and move its data by direct memory access while the processor remains in a deep low-power state, so the link does not force the part awake.[95]
Host software and operating systems
Serial access under Linux is architecture-independent: an application written as ordinary C against the operating system’s serial interface can be rebuilt unchanged for a different processor family and behave the same way.[378] The Unix-side habit is to attach a terminal program such as Screen directly to the port device, whereas embedded tooling still centres on Windows even as cross-platform support improves.[489] The standing tradeoff with the Unix approach is capability against required expertise, captured in the old saying that with Unix you can do anything, but to do anything you have to be an expert.[489]
The most frequent cause of a serial link that will not talk is simply the wrong port selected on the host, particularly on a machine with several enumerated devices.[391] Driver installation and identifying the correct port are the single largest source of beginner support requests for development boards, which is why a board that mounts as a storage device instead removes an entire category of failure before it happens.[458] Detection problems can also originate on the device side: a development board that presents two serial ports, one for data and one for control, broke host-side detection because the tooling could not tell which was which.[351] A point-to-point network gadget over USB cannot configure itself because the device has no way to detect which host operating system it is attached to, leaving per-platform setup that every user must perform by hand.[378]
Fault isolation and silicon errata
The standard way to separate a host problem from a device problem is to put an instrument on the physical pins and check whether anything is being transmitted at all before debugging software.[391]
Silicon errata can take out a peripheral completely, including entire serial ports that do not function and pins that are not where the datasheet says they are, with vendors sometimes supplying an unexplained instruction sequence as the workaround.[482]
Programming and bootloading
A bootloader resident in the target part removes the need for a separate programmer, so a plain serial connection is enough to load a program. The BASIC Stamp worked this way, and the same pattern was used by later beginner boards.[570] Making a board programmable over a plain serial connection, with no dedicated programmer in the way, was a deliberate route to lowering the barrier for people who only wanted to build something.[339]
Field updates follow the same channel: most handheld multimeters cannot be updated in the field at all, and those that can generally require a serial interface, which is why a memory-card update path is unusual.[364]
Automatic reset
On Arduino, Massimo Banzi introduced automatic reset for programming by soldering a capacitor between two pins so that the host’s serial handshake line resets the board, removing the need to press a button at the right instant.[726] The mechanism is edge conversion: the host asserts the data terminal ready line as the port opens, and the series capacitor turns that transition into a reset pulse rather than a level.[726] The design came out of a teaching session in which students could not get the manual reset timing right, so the fix was prompted by watching beginners fail rather than by a specification.[726]
Displacement by USB and wireless
The transition away from native serial ports ran through plug-and-play converter modules and then single-chip USB-to-serial parts, the wave that established dedicated converter vendors such as FTDI.[471] By the late 2010s, a desktop machine still shipping with both a serial and a parallel port was remarkable enough to comment on, marking how far these interfaces had receded from standard hardware.[366] The parallel port gave direct access to pin states while a serial port needs a controller to interpret framed commands, and the parallel interface has become the harder of the two to find on modern hardware.[408]
Bluetooth was conceived as a wireless replacement for a serial cable, which is why classic Bluetooth carries good support for presenting itself as a serial port to the host.[354] Bluetooth Low Energy dropped that capability: it carries no serial port profile, so a transparent byte pipe over BLE has to be improvised.[516] Low Energy is not a lighter version of classic Bluetooth but a different and considerably more rigid protocol, which catches out designers who assume feature parity.[516] Wireless links that appear as serial ports on the host remain in active use; a measurement instrument powered by a lithium-ion cell for low noise cannot stay tethered, so its results leave over such a link.[448]
Multi-port systems and expansion
A single USB connection can expose several independent serial ports at once, with one of them wired straight through to the board’s own asynchronous lines so an attached module can be reached directly.[689] Keeping the command format on such a device human-readable rather than binary lets other people drive the instrument from whatever tool they already have, including a spreadsheet sending paths over its serial interface.[689]
Scarcity of ports forces architecture. Needing six serial ports for six motor drives produced an awkward arrangement of one master microcontroller feeding two slaves, exactly the situation a multi-drop bus removes.[416] A measurement system consolidating a rack of instruments was built on a processor rather than a microcontroller because it needed deterministic timing while servicing several serial ports and incoming interrupts at once.[419] Industrial backplane computers addressed the same demand with plug-in cards carrying eight serial ports each, alongside digital and relay input-output cards.[362]
Test, measurement, and industrial use
Instrument control software has long been thin: decades of production test tooling amounted to sending bytes in and out of a serial port to configure equipment, which is why the host language mattered less than turnaround speed.[135] A hardware reverse-engineering exercise models the real toolkit as a voltage probe, a pulse generator, register access over a debug interface, and a serial port for reading and writing data.[332]
A module that merely streams measurements out as a serial port invites the question of whether it could serve a web interface instead, and the limit is usually the module’s own capability rather than the idea.[345] A benchtop pick-and-place machine presents to the host as a COM port and runs 3D-printer firmware, so it is effectively a printer with more axes and no hot end, which is why existing host software can drive it.[686] Older vehicle buses are best understood as a serial port with a fixed frame format: an oscilloscope shows the transitions, but the encoding has to be known before the data means anything.[388]
Serial ports versus debug ports
Describing a hardware debugger as a serial port into the processor misleads anyone whose background is beginner boards; in that world, Scott Shawcroft observes, the term means text going back and forth rather than register-level control.[383] The actual low-level debug loop is a hardware probe on the processor’s debug port with a debugger server that loads, resets, and runs the image, plus a logic analyser on the flash bus to confirm the code is doing what was intended.[383]
FPGA and connector practice
On Luke Valenty’s FPGA board, implementing the USB device inside the programmable fabric removed the external interface chip from the bill of materials, with the board enumerating on the host as an ordinary serial port.[395] That works because the part supports several configuration images in its flash, with a primitive that selects which one to load next, so the USB personality can be the default boot and the application image loaded afterwards.[395]
For low-frequency interconnect between boards inside a rack, a board-mounted D connector that simply slides together is the pragmatic choice when the build quantity does not justify a custom cable.[277] Reusing a familiar connector for a non-standard signal set requires explicit labelling on the product, because users will otherwise plug in equipment expecting the connector’s usual function.[277]
Historical design constraints
On the Osborne 1, Lee Felsenstein’s general-purpose serial port ran only at 1200 and 300 baud because those were the only rates derivable from the existing video counter chain, a rate limit chosen for cost reduction rather than protocol reasons.[684] The same machine’s connector was made to serve both the IEEE-488 instrumentation bus the customer wanted and a general-purpose parallel port, with software rather than extra hardware doing the work.[684]