How does it work?
USB UART 5 Click is based on the CP2110, a single-chip HID USB to UART bridge controller from Silicon Labs. A USB function controller in the CP2110 is a USB 2.0-compliant, full-speed device with an integrated USB transceiver, one-time programmable ROM, and an asynchronous serial data bus (UART) in one compact package. The UART capabilities of the CP2110 include baud rate support from 300 to 1Mbps, hardware flow control, RS-485 support, and GPIO signals that are user-defined for status and control information. The USB function controller manages all data transfers between USB and UART, command requests generated by the USB host controller, and commands for controlling the function of the UARTs and GPIO pins.
The CP2110 uses the standard USB HID device class, natively supported by most operating systems. A custom driver does not need to be installed for this device. In addition, the CP2110 also supports USB Suspend and Resume modes for power management purposes. The CP2110 enters Suspend mode when Suspend signaling is detected on the bus using the SPD pin of the mikroBUS™ socket. Upon entering Suspend mode, the SPD signal is asserted, but it can also be asserted after a reset condition (RST pin) until device configuration during USB Enumeration is complete. SPD pin detects logic high level when the device is in the Suspend state and logic low when the device is in Normal mode, which is also visually indicated via red LED labeled as CONNECTED.
This Click board™ also features 8 GPIO signals, located on unpopulated headers, that are user-defined for status and control information. Four GPIO signals support alternate features, including a configurable clock output (CLK) from 24MHz to 47kHz, RS-485 transceiver control, and TX and RX LED toggle features. Also, the USB UART 5 Click can work in a USB-powered configuration thanks to the ability of the CP2110 to provide adequate power to all its parts with the help of an internal regulator using the USB bus voltage. To select this mode of operation, it is necessary to switch the jumper PWR SEL to the position marked with VBUS.
This Click board™ can only be operated from a 3.3V logic voltage level. Therefore, the board must perform appropriate logic voltage conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
USB
Applications
Can be used to quickly add a USB 2.0 full-speed compliant UART interface for custom applications
On-board modules
CP2110 – USB-to-UART bridge controller from Silicon Labs
Key Features
HID interface USB to UART data transfer, full speed USB 2.0-compliant, standard USB class device that requires no custom driver, Self or USB powered configuration, UART flow control, various data formats and baud rates, RS-485 mode with bus transceiver control, Suspend mode, GPIO interface, and more
Interface
UART,USB
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on USB UART 5 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2 | CONNECTED | – | Normal Operation LED Indicator |
JP1 | PWR SEL | Left | Self/USB-Powered Configuration Selection 3V3/VBUS: Left position 3V3, Right position VBUS |
J1-J2 | – | Unpopulated | User-Configurable GPIOs Headers |
USB UART 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Baud Rate | 0.0003 | – | 1 | Mbps |
Configurable Clock Output | 47 | – | 24.000 | kHz |
Software Support
We provide a library for the USB UART 5 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for USB UART 5 Click driver.
Key functions
-
usbuart5_generic_write
USB UART 5 data writing function. -
usbuart5_generic_read
USB UART 5 data reading function. -
usbuart5_reset_device
USB UART 5 reset the device function.
Example Description
This example reads and processes data from USB UART 5 Click board™. The library initializes and defines the UART bus drivers to transmit or receive data.
void application_task ( void )
{
char rx_data = 0;
if ( usbuart5_generic_read ( &usbuart5, &rx_data, 1 ) )
{
if ( usbuart5_generic_write ( &usbuart5, &rx_data, 1 ) )
{
log_printf( &logger, "%c", rx_data );
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.USBUART5
Additional notes and informations
Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click, or RS232 Click to connect to your PC for development systems with no UART to USB interface available on the board. A UART terminal is available in all Mikroe compilers.
mikroSDK
This Click board™ is supported by a mikroSDK – Mikroe Software Development Kit, which needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.