Difference between revisions of "Serial port"

From sigrok
Jump to navigation Jump to search
(serial over HID is supported by mainline)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- Please note: This article is a stub and planned to be extended. -->
Serial ports are a common way to communicate with devices. The most common serial ports, as used by devices like Metex/Voltcraft multimeters, are RS232 interfaces.  


Serial Ports are a common way to communicate with devices. The most common serial ports, as used by devices like Metex/Voltcraft multimeters, are RS-232 interfaces.
== USB to serial converters ==


To operate devices that have RS232 or TTL serial interfaces on computers that have only USB interfaces, converters are available. Many different chipsets exist that have slightly different properties, often supporting only a subset of what common UARTs like the 8250/16550A can do. Please note that a chipset-specific driver for the respective operating system is required (sometimes included in the OS already, e.g. mostly for Linux). Chipset and driver need to be seen as a union. The problems with some chipsets mostly seem to be more related to the quality of the driver than that of the hardware. Many original USB cables from OEM manufacturers use these converters, too, either with the chip manufacturer's or a custom USB ID.


Most of the USB to serial converter chipsets deliver 3.3V or 5V TTL level signals and an additional converter chip between signal levels usually called a ''Line Driver/Receiver'', e.g. a [http://en.wikipedia.org/wiki/MAX232 Maxim MAX232], is required to interface to a RS232 or other interface that uses different signal levels.
The RS232 standard allows quite a huge span of 3 to 15V resp. -3 to -15V for the two signal levels. Some RS232 devices won't work on USB-RS232 converters because these converters tend to be at the lower end of these voltages and the devices need a higher RS232 signal voltage to work, e.g. to drive optocouplers in the interface. Sometimes a device might work on a converter of type A and won't on a converter of type B, depending on the chips used and other parameters chosen by the manufacturer.


= USB to Serial Converters =
== USB to serial converter chipsets ==
To operate devices that have RS-232 or TTL serial interfaces on computers that have only USB interfaces, converters are available. Many different chipsets exist that have slightly different properties, often supporting only a subset of what common UARTs like the 8250/16550A can do. Please note that a chipset-specific driver for the respective operating system is required (sometimes included in the OS already, e.g. mostly for Linux). Chipset and driver need to be seen as a union. The problems with some chipsets mostly seem to be more related to the quality of the driver than that of the hardware. Many original USB cables from OEM manufacturers use these converters, too, either with the chip manufacturer's or a custom USB ID.
 
Most of the USB to serial converter chipsets deliver 3.3 V or 5V TTL level signals and an additional converter chip between signal levels usually called a ''Line Driver/Receiver'', e.g. a [http://en.wikipedia.org/wiki/MAX232 Maxim MAX232], is required to interface to a RS232 or other interface that uses different signal levels.
The RS232 standard allows quite a huge span of 3 to 15 V resp. -3 to -15 V for the two signal levels. Some RS232 devices won't work on USB-RS232 converters because these converters tend to be at the lower end of these voltages and the devices need need a higher RS232 signal voltage to work, e.g. to drive optocouplers in the interface. Sometimes a device might work on a converter of type A and won't on a converter of type B, depending on the chips used and other parameters chosen by the manufacturer.


== USB to Serial converter chipsets ==
{|border="0" style="font-size: smaller" class="alternategrey sortable sigroktable"
{|border="0" style="font-size: smaller" class="alternategrey sortable sigroktable"
|-  
|-  
Line 137: Line 135:
| Win
| Win
| [http://www.cypress.com/?rID=63304]
| [http://www.cypress.com/?rID=63304]
| HW Handshake supported only up to 1150200 baud.
| HW Handshake supported only up to 115200 baud.


|-
|-
Line 166: Line 164:


|-
|-
| rowspan="6" | FTDI
| rowspan="6" | FTDI<sup>1</sup>
| many
| many
|  
|  
Line 249: Line 247:
| Linux, WinXP, WinVista, Win7
| Linux, WinXP, WinVista, Win7
| [http://www.microchip.com/wwwproducts/devices.aspx?dDocName=en546923]
| [http://www.microchip.com/wwwproducts/devices.aspx?dDocName=en546923]
| 8x GPIO; custom baud rates set in non-std way using DLL/USB cmd. There exists information on the net that it is based on a PIC18F14K50 microcontroller.
| 8x GPIO; custom baud rates set in non-standard way using DLL/USB commands. There exists information on the net that it is based on a PIC18F14K50 microcontroller.


|-
|-
Line 274: Line 272:
| Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8
| Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8
| [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=107&pcid=41]
| [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=107&pcid=41]
| 4x GPIO, 4x Aux GPIO; >115200 baud without control lines; Custom baud rates seem to require special driver from manufacturer
| 4x GPIO, 4x Aux GPIO; >115200 baud without control lines; Custom baud rates seem to require special driver from manufacturer.


|-
|-
Line 286: Line 284:
| Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8
| Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8
| [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=107&pcid=41]
| [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=107&pcid=41]
| With RS232 transceiver; 4x GPIO; Custom baud rates seem to require special driver from manufacturer
| With RS232 transceiver; 4x GPIO; Custom baud rates seem to require special driver from manufacturer.


|-
|-
Line 299: Line 297:
|
|
|  
|  
| It seems that fakes of Prolific chips with limited reliability exist.[http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=155&pcid=41 1]
| It seems that [http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=155&pcid=41 fakes of Prolific chips] with limited reliability exist.


|-
|-
| SiLabs
| rowspan="2" | SiLabs
| CP21xx
| CP21xx
|  
| 2.0
| device-dependant
| style="text-align:center" | &mdash;<sup>2</sup>
| 300?
| up to 2 Mbps
| device-dependant
| Linux, Mac, Windows
| [http://www.silabs.com/products/interface/usbtouart/Pages/usb-to-uart-bridge.aspx]
| Family of several devices, 1-4 serial ports.
 
|-
| CP2102
| 2.0
| 5,6,7,8
| 5,6,7,8
| style="text-align:center" | &mdash;<sup>2</sup>
| 300
| 1 Mbps
| 6
| Linux, Mac, Windows
| [http://www.silabs.com/Support%20Documents/TechnicalDocs/CP2102-9.pdf]
|  
|  
|  
 
| 2 Mbps
|-
|
| Sunplus
|  
| SPCP825
| [http://www.silabs.com/products/interface/usbtouart/Pages/usb-to-uart-bridge.aspx]
| 1.1
| Family of several devices
| 8
| -
| 300
| 115200
| -
| Windows 98-XP
| [http://www.sunplusmcu.com/product/data8.asp] [http://www.sunplusmcu.com/soft/DS_SPCP825A_En.pdf]
| Seems to be used by old versions of the [[Device cables#V.26A VA4000|''V&amp;A VA4000'' device cable]]. English home page broken.


|-
|-
Line 325: Line 348:
| Linux?, Mac?; Win
| Linux?, Mac?; Win
| [http://www.ti.com/product/tusb3410]
| [http://www.ti.com/product/tusb3410]
| Integrated 8052 microcontroller, I<sup>2</sup>C, IrDA up to 115200 baud, auto handshake, internal test & diagnostics, 4x GPIO; Linux and Mac drivers seem to require (free)  
| Integrated 8052 microcontroller, I<sup>2</sup>C, IrDA up to 115200 baud, auto handshake, internal test & diagnostics, 4x GPIO; Linux and Mac drivers seem to require (free).


|-
|-
Line 341: Line 364:


|}
|}
<small>
<sup>1</sup> In October 2014 FTDI published Windows drivers version 2.11.0 and 2.12.0.0 that will check for fake FTDI chips. If these drivers suspect a chip to be a fake, they will overwrite the USB manufacturer and device ID of the device to 0, effectively [http://en.wikipedia.org/wiki/Brick_(electronics) bricking] the device. Installation of these driver versions (that were distributed via Windows Update automatically for some time) is strongly discouraged! See [http://www.eevblog.com/2014/10/27/eevblog-676-rant-ftdi-bricking-counterfeit-chips/ EEVblog #676] or [https://twitter.com/hashtag/FTDIGate #FTDIgate] for further information.<br />
<sup>2</sup> The CP2102 and CP2103 offer aliasing a standard baud rate to a non-standard baud rate by using the manufacturer's customization tool.<br />
</small>


Modem: Not all USB to serial converters support all lines used for modem status and hardware handshake. 6 means that RTS, CTS, DTR, DSR, DCD, and RI are present. 4 means that RTS, CTS, DTR, DSR are present, 2 means RTS, CTS only.
Modem: Not all USB to serial converters support all lines used for modem status and hardware handshake. 6 means that RTS, CTS, DTR, DSR, DCD, and RI are present. 4 means that RTS, CTS, DTR, DSR are present, 2 means RTS, CTS only.
Line 346: Line 374:
The list above tries to include all manufacturers of such converter chips. It does not include all variants because some manufacturers have over 100!
The list above tries to include all manufacturers of such converter chips. It does not include all variants because some manufacturers have over 100!


== Common Serial to RS232 Line Driver/Receiver Chipset Manufacturers ==
Many USB devices that use a custom USB identity are based on these chips, too. Most manufacturers offer tools that allow setting USB properties like Vendor ID, Product ID, Product Description String, Power Descriptor, Device Release Number and Device Serial number.
* Analog Devices [http://www.analog.com/static/imported-files/data_sheets/ADM222_232A_242.pdf]
 
== Common serial to RS232 line driver/receiver chipset manufacturers ==
 
* [http://www.analog.com/static/imported-files/data_sheets/ADM222_232A_242.pdf Analog Devices]
* [http://para.maximintegrated.com/results.mvp?fam=rs232 Maxim]
* [http://para.maximintegrated.com/results.mvp?fam=rs232 Maxim]
* [http://www.ti.com/product/sn75lv4737a Texas Instruments]
* [http://www.zywyn.com/ ZyWyn]
* [http://www.zywyn.com/ ZyWyn]
== USB to HID converter chipsets ==
These devices are based on the USB HID device class and have no serial interface/RS232 emulation at the USB protocol level.
But the chips implement access to the RS232 protocol, and communicate control and data by means of USB HID reports.
{|border="0" style="font-size: smaller" class="alternategrey sortable sigroktable"
|-
! Manufacturer
! Type
! USB
! Drivers
! Homepage
! Remarks
|-
| Hoitek
| HE2325U
| 1.1
| style="text-align:center" |*
| [http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/hid-ser.en.htm]
| Seems to be used by older versions of the [[Device_cables#UNI-T_UT-D04|UNI-T UT-D04 device cable]].
|-
| Unmarked
| SO-20 chip
| ?
| ?
|
| Found e.g. in the [[Victor 70C]] DMM, or the [[Victor 86C]] cable.
|-
| WCH
| CH9325
| ?
| style="text-align:center" |*
|
| Seems to be used by newer versions of the [[Device_cables#UNI-T_UT-D04|UNI-T UT-D04 device cable]].
Appears to use a programming model that is similar with / upwards compatible with HE2325U.
|-
| SiLabs
| CP2110
| 2.0 compatible (implements 1.1 FS)
| style="text-align:center" |*
| [http://www.silabs.com silabs.com]
| used in the [[Device_cables#UNI-T_UT-D09|UNI-T UT-D09 device cable]], built into the [[UNI-T UT612]] LCR meter, the [[Voltcraft VC-890]] DMM
|}
The serial communication layer of libsigrok transparently supports most of the above HID chips.
Those which are not supported by the serial layer can be supported by specific device drivers (Victor DMMs).
== See also ==
* [[Device cables]]
* [[Multimeter ICs]]
[[Category:Device comparison]]

Latest revision as of 19:16, 4 June 2019

Serial ports are a common way to communicate with devices. The most common serial ports, as used by devices like Metex/Voltcraft multimeters, are RS232 interfaces.

USB to serial converters

To operate devices that have RS232 or TTL serial interfaces on computers that have only USB interfaces, converters are available. Many different chipsets exist that have slightly different properties, often supporting only a subset of what common UARTs like the 8250/16550A can do. Please note that a chipset-specific driver for the respective operating system is required (sometimes included in the OS already, e.g. mostly for Linux). Chipset and driver need to be seen as a union. The problems with some chipsets mostly seem to be more related to the quality of the driver than that of the hardware. Many original USB cables from OEM manufacturers use these converters, too, either with the chip manufacturer's or a custom USB ID.

Most of the USB to serial converter chipsets deliver 3.3V or 5V TTL level signals and an additional converter chip between signal levels usually called a Line Driver/Receiver, e.g. a Maxim MAX232, is required to interface to a RS232 or other interface that uses different signal levels.

The RS232 standard allows quite a huge span of 3 to 15V resp. -3 to -15V for the two signal levels. Some RS232 devices won't work on USB-RS232 converters because these converters tend to be at the lower end of these voltages and the devices need a higher RS232 signal voltage to work, e.g. to drive optocouplers in the interface. Sometimes a device might work on a converter of type A and won't on a converter of type B, depending on the chips used and other parameters chosen by the manufacturer.

USB to serial converter chipsets

Manufacturer Type USB Data Bits Custom baud Baud min. max. Modem Drivers Homepage Remarks
 Asix (former MOSChip) MCS7840 2.0 5,6,7,8 yes; broken on Mac [1] 4 serial ports
MCS7820 2.0 [2] 2 serial ports
MCS7810 2.0 [3] 1 serial port
MCS7720 1.1 [4] 2 serial ports
MCS7717 1.1 [5] 1 serial, 1 parallel port and 3-port USB hub; out of production
MCS7715 1.1 [6] 1 serial, 1 parallel port
MCS7710 1.1 [7] 1 serial port; out of production


MCS7703 1.1 [8] 1 serial port; out of production


 Cypress CY7C64225 2.0 8 300 230400 4 Win [9] HW Handshake supported only up to 115200 baud.
CY7C65211 2.0 7,8 —? 300 3 Mbaud 4 Android, Linux, Mac, WinCE, Win XP-8 [10] 1x I2C, 1x SPI, 10x GPIO
CY7C65213 2.0 7,8 [11] 8 x GPIO
CY7C65215 2.0 7,8 [12] 2 serial ports, 2x I2C, 2x SPI, 17x GPIO
FTDI1 many 7,8 [13] FTDI chips have 2 different driver models, one allowing bit-banging and other exotic features with appropriate chips.
FT230X 2.0 7,8 183.1 3 Mbaud 2 Linux, Mac, WinCE 4.2-6, WinXP-8, others [14]
FT231X 2.0 7,8 183.1 3 Mbaud 6 Linux, Mac, WinCE 4.2-6, WinXP-8, others [15]
FT232H 2.0 7,8 183.1 12 Mbaud 6 Linux, Mac, WinCE 4.2-6, WinXP-8, others [16] Allows many protocols, including UART, JTAG, I2C, SPI, FT1248, bit-bang
FT234X 2.0 7,8 183.1 3 Mbaud 2 Linux, Mac, WinCE 4.2-6, WinXP-8, others [17]
FT4234H 2.0 7,8 183.1 12 Mbaud 6 Linux, Mac, WinCE 4.2-6, WinXP-8, others [18] 4x UART, 2x MPSSE (FTDI), 32x GPIO
Microchip MCP2200 2.0 8; others? 300 1 Mbaud 2 Linux, WinXP, WinVista, Win7 [19] 8x GPIO; custom baud rates set in non-standard way using DLL/USB commands. There exists information on the net that it is based on a PIC18F14K50 microcontroller.
Prolific PL-2303x 5,6,7,8 300 115200 6 Linux, Mac, WinCE5, WinXP, WinVista-8.1 [20] There has been critique concerning the quality of the driver (for which OSses?).
PL-2303HX 1.1 5,6,7,8 ● (driver!) 75 6 (12) Mbps 6 Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8 [21] 4x GPIO, 4x Aux GPIO; >115200 baud without control lines; Custom baud rates seem to require special driver from manufacturer.
PL-2303RA 1.1 5,6,7,8 ● (driver!) 75 921600 6 Linux, Mac, WinCE4.2-7, Win2000, XP, Vista, 8 [22] With RS232 transceiver; 4x GPIO; Custom baud rates seem to require special driver from manufacturer.
Prolific Fake (PL-2303) It seems that fakes of Prolific chips with limited reliability exist.
SiLabs CP21xx 2.0 device-dependant 2 300? up to 2 Mbps device-dependant Linux, Mac, Windows [23] Family of several devices, 1-4 serial ports.
CP2102 2.0 5,6,7,8 2 300 1 Mbps 6 Linux, Mac, Windows [24]
Sunplus SPCP825 1.1 8 - 300 115200 - Windows 98-XP [25] [26] Seems to be used by old versions of the V&A VA4000 device cable. English home page broken.
Texas Instruments TUSB3410 2.0 5,6,7,8 50 (I)/1200 2 Mbps 6 Linux?, Mac?; Win [27] Integrated 8052 microcontroller, I2C, IrDA up to 115200 baud, auto handshake, internal test & diagnostics, 4x GPIO; Linux and Mac drivers seem to require (free).
WCH IC CH340x, CH341x 2.0 8 50 2 Mbps 6 Win98-Win7; (Linux) [28] IrDA SIR, ...

1 In October 2014 FTDI published Windows drivers version 2.11.0 and 2.12.0.0 that will check for fake FTDI chips. If these drivers suspect a chip to be a fake, they will overwrite the USB manufacturer and device ID of the device to 0, effectively bricking the device. Installation of these driver versions (that were distributed via Windows Update automatically for some time) is strongly discouraged! See EEVblog #676 or #FTDIgate for further information.
2 The CP2102 and CP2103 offer aliasing a standard baud rate to a non-standard baud rate by using the manufacturer's customization tool.

Modem: Not all USB to serial converters support all lines used for modem status and hardware handshake. 6 means that RTS, CTS, DTR, DSR, DCD, and RI are present. 4 means that RTS, CTS, DTR, DSR are present, 2 means RTS, CTS only.

The list above tries to include all manufacturers of such converter chips. It does not include all variants because some manufacturers have over 100!

Many USB devices that use a custom USB identity are based on these chips, too. Most manufacturers offer tools that allow setting USB properties like Vendor ID, Product ID, Product Description String, Power Descriptor, Device Release Number and Device Serial number.

Common serial to RS232 line driver/receiver chipset manufacturers

USB to HID converter chipsets

These devices are based on the USB HID device class and have no serial interface/RS232 emulation at the USB protocol level. But the chips implement access to the RS232 protocol, and communicate control and data by means of USB HID reports.

Manufacturer Type USB Drivers Homepage Remarks
Hoitek HE2325U 1.1 * [29] Seems to be used by older versions of the UNI-T UT-D04 device cable.
Unmarked SO-20 chip ? ? Found e.g. in the Victor 70C DMM, or the Victor 86C cable.
WCH CH9325 ? * Seems to be used by newer versions of the UNI-T UT-D04 device cable.

Appears to use a programming model that is similar with / upwards compatible with HE2325U.

SiLabs CP2110 2.0 compatible (implements 1.1 FS) * silabs.com used in the UNI-T UT-D09 device cable, built into the UNI-T UT612 LCR meter, the Voltcraft VC-890 DMM

The serial communication layer of libsigrok transparently supports most of the above HID chips. Those which are not supported by the serial layer can be supported by specific device drivers (Victor DMMs).

See also