USB UART 3 Click Board
USB UART 3 Click Board
The USB UART 3 Click Board™ is a versatile and feature-rich USB to UART interface from Silicon Labs. It uses CP2102N which is a part of their USBXpress family. These devices are designed to quickly add a USB 2.0 full-speed compliant UART interface for custom applications, by eliminating firmware complexity and reducing development time.
The USB UART 3 Click Board™ requires appropriate drivers to be installed in the host OS, in order to support the virtual COM port functionality. Once installed, this device offers amazing connectivity options, up to 3 Mbaud, a very low number of external components, a simplified setup of the advanced options via the GUI-based configuration utility (if required), out-of-the-box functionality with the royalty-free virtual COM port drivers, provided by the Silicon Labs.
Software Support
We provide a demo application for the USB UART 3 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library performs IR and temperature measurement. The sensor gets an IR picture of the detected object (body) and measures ambient temperature, compares that two measurements and shows the IR picture as a 16x4 matrix. For more details check the documentation.
Key Functions
void usbuart3_writeByte(uint8_t input)
- Write Single Byte.uint8_t usbuart3_readByte()
- Read Single Byte.uint8_t usbuart3_byteReady()
- Check for the new byte received.
Example Description
The application is composed of three sections:
- System Initialization - Initializes UART module.
- Application Initialization - Driver intialization.
- Application Task - (code snippet) - Checks if new data byte has received in the RX buffer (ready for reading), and if ready than reads one byte from the RX buffer. In the second case, the application task writes the message data via UART.
void applicationTask() { char tmp; uint8_t rdyFlag; // RECEIVER - UART polling rdyFlag = usbuart3_byteReady(); if (1 == rdyFlag) { tmp = usbuart3_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } // TRANSMITER - TX each 2 sec for (tmp = 0; tmp < 9; tmp++) { usbuart3_writeByte( MESSAGE_DATA[tmp] ); mikrobus_logWrite( "MESSAGE SENT", _LOG_LINE ); } Delay_ms(2000); }
The full application code, and ready to use projects can be found on our Libstock page.
Other MikroElektronika libraries used in the example:
- UART
Additional Notes and Information
Depending on the development board you are using, you may need a 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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The USB UART 3 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
USB UART 3 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.