USB Host – Serial Driver for FTDI, CP210X, PL2303, CH340/1 and CDC

 

This software allows you to connect a USB serial device that uses an FTDI, CP210X, PL2303 or CH340G USB chipset, or is a CDC device to the USB Host Board or USB Host IC’s and send and receive data.

This is a free software download for our USB Host Board and USB Host IC’s (SOICDIPSSOP).

Please note: This software is free to download but only works on one of our USB boards or chips which must be bought separately.
To order, simply select which of our boards or IC products you wish to have the software loaded onto. See the USB Host Board and IC product pages for details onĀ pricingĀ and installing this software.

What is a USB Serial device

Many serial devices use a USB chipset so the device can be easily plugged into a computer’s USB port. You will find this type of chip on products like USB GPS receivers. There are several USB chip sets made by a number of companies. This driver software is for products from FTDI, Silicon Labs (SiLabs), Prolific, WCH and for CDC devices.

Supported Chipsets

The USB SERIAL Driver has been tested to work with the following chips. Serial chipsets from the same manufacturers should also work.

  • FTDI FT232RL
  • FTDI FT232R
  • FTDI FT232H
  • FTDI FT201XS
  • FTDI FT230X
  • FTDI FT231X
  • FTDI FT2232 D/H
  • Prolific PL2303
  • SiLabs CP210X range
  • CH340G / CH341G
  • STMicro Virtual Comms Port
  • UBlox USB GPS
  • Teensy Microcontrollers
  • Arduino Boards using CDC (UNO, Mega, Leonardo etc)
  • Microchip MCP2200 (CDC)
  • CDC Communications

As of V1.19, it now supports devices using USB CDC communication.

WHY?

You might think it a little strange that the chip in the device is converting serial to USB, then we are converting it back to serial again. Well yes, that is true. You could simply open up the device and gain access to the serial connection directly and that may well be the easiest and cheapest option.

But if you don’t want to modify the device (and void the warranty), or if you want data from the device at a different baud rate (e.g. USB GPS runs at 4800 baud, but you want serial data at 9600 baud), then this software and the USB Host board / IC is what you need.

USB Host Configuration

The following Commands (sent via Serial connection) are available to configure the USB Host Board / IC with the SERIAL software

These commands are used to configure the USB Host board / IC and will only function when no device is plugged into the board. If a device is plugged in, these commands will be sent to the device.

Command mode is also available when a USB device is connected and pin labelled SCL is pulled LOW. This way the remote baud rate and parity can be changed on the fly without disconnecting and reconnecting. The SCL pin is pulled high internally so can be left unconnected.

Note: This feature conflicts with the RTSCTS option. If RTSCTS is enabled then command mode can only be accessed when no USB device is plugged in.

COMMAND 
BAUD <value>Set local Serial Port Baud Rate (default 9600)
[2400|4800|9600|14400|19200|38400|57600|115200]
USBBAUD <value>Set Serial Port Baud Rate for the USB device (default 9600)
[2400|4800|9600|14400|19200|38400|57600|115200
 230400|460800|500000]
USBPARITY <value>Set Serial Port Parity for the USB device (default 8N1)
[8N1|8O1|8E1]
INTERFACE <value>Set Serial to USB interface method
0 – String/Packet – sends data as a packet
1 – Byte   – sends each byte as it is received
TIMEOUT <value>Timeout (in ms after last character) for sending packet
values from 1 to 30 (in milliseconds) – default 5ms
Applies to INTERFACE 0 only
USB <value>USB Data request timer (in ms)
1-20 (default 5)
GROUP <value>Group Serial Data together.
0 – OFF, 1 – ON  (default OFF)
RTSCTS <value>Local RTS/CTS Handshaking
0 – OFF, 1 – ON  (default OFF)
PORT <value>Serial Port Selection. If attached USB device has more than one Serial port, you can choose which port to connect to.
E.g. FT2232H
1, 2 (default 1)
RS232 <value>Set Serial Port Configuration
0 – default TTL (positive logic)
1 – RS232 (negative logic)
HELP or ?Display help

BAUD

The baud rate for communication with the USB Host (default 9600). Note that this does not effect the communications speed with the attached device.

USBBAUD

The baud rate for the USB device. This should be set to the required value for the device. E.g. if the device is a GPS unit that runs at 4800 baud, the USBBAUD setting should be set to 4800

USBPARITY

The parity for the USB device. This should be set to the required value for the device. The default is 8N1, but you can set it to 8N1 (no parity), 8O1 (odd parity) or 8E1 (even parity).

NOTE: The serial interface of the USB Host is still 8N1, you are setting the parity of the attached USB device only.

INTERFACE

You can control how data is sent to the attached USB device.

  • 0 – String/Packet – sends data as a packet. See also the TIMEOUT setting below
          The data is received by the USB Host board and sent as a packet when no data has been
          received for the TIMEOUT duration.
  • 1 – Byte – sends each byte as it is received

The default is 0-String/Packet, and should work for most users. Only use Byte mode if you must have the data instantly.

TIMEOUT

This is the timeout in ms after which the data is sent as a packet. The default is 5ms and can be set anywhere between 1ms and 30ms. Test data worked without any errors with the default setting of 5ms at 115200 baud.

USB

USB Data request timer (in ms). – default 5ms
This allows you to adjust how frequently the USB Host requests a data transfer. Setting can be between 1ms and 20ms. The default setting should be suitable for most applications

GROUP

Because of the way USB works, data is requested and transferred in packets – this can lead to small gaps in the data output (NOT lost data). This setting tries to keep data together by only outputting the data when a USB data request returns a “no data” packet. Valid settings are 0 – OFF, 1 – ON. For most users, this setting will have no effect.

RTSCTS

RTS/CTS handshaking is for local data received from the USB Device. For data sent to the USB device handshaking is not enabled.

If you are connecting a microcontroller to the USB Host board you may only want to receive data at certain points in your program. Turn ON RTS/CTS handshaking for this functionality.

RTS on the USB Host board is the pin labelled SDA. This is an output pin which is normally HIGH when there is NO data available.
When data is available, this pin goes LOW.

CTS on the USB Host board is the pin labelled SCL. This is an input pin which should be held HIGH when you don’t want data to be transmitted.
Pull this pin LOW to receive data.

Note that the data buffer on the USB Host is 2K bytes. If received data goes beyond this without being read then data will be overwritten.

PORT

Serial Port Selection. Some USB devices have more than one serial port
If attached USB device has more than one Serial port, you can choose which port to connect to.
E.g. FT2232H has 2 ports

If the attached device has only one port, this setting has no effect.

RS232 Port Configuration

You can now set the serial port to RS232 negative logic (local – not the attached USB device). This will enable you to connect the board directly to serial ports that support the RS232 negative logic format.

There are a few important points to bear in mind

  • This does not effect the bootloader, so program updates will still need a positive logic TTL connection
  • Once you have activated RS232 mode, you will need to communicate with the Host board/chip using RS232
  • RS232 is negative logic, but the host chip will only provide 0V and 3.3V output. It will not produce negative voltages
  • Do not connect to RS232 ports that have high voltages – e.g. old style PC serial ports which operate at +/- 12V


Connections required

  • 5V power in
  • 0V
  • TX out
  • RX in
  • SS pin (optional). This pin goes high when a USB device is attached
  • SDO(A) (optional). This pin controls the remote DTR and RTS pins. This pin is high by default and so the remote RTS and DTR pins are high too. Pull this pin low to also pull the remote DTR and RTS pins low.

Program Updates

To upload the Software to the USB Host Board you will need to use the ds30Loader program. See the USB Host Board product page for more information on this.

Shopping Basket
Scroll to Top