USB-auf-I2C-2-Click-Platine
USB-auf-I2C-2-Click-Platine
Overview
Das USB-zu-I2C-2-Click-Board™ ist eine kompakte Zusatzplatine, die eine universelle USB-zu-I2C-Seriellschnittstelle enthält. Diese Platine verfügt über den FT201X, einen Full-Speed-USB-zu-I2C-Protokollkonverter von FTDI. Der FT201X wandelt USB 2.0 Full-Speed in eine I2C-Seriellschnittstelle um, die mit bis zu 3,4 MBit/s betrieben werden kann und einen geringen Stromverbrauch (typischerweise 8 mA) aufweist. Das gesamte USB-Protokoll wird auf dem Chip selbst verarbeitet, sodass keine USB-spezifische Firmware-Programmierung erforderlich ist. Es verfügt außerdem über einen vollständig integrierten 2048-Byte-MTP-Speicher (Multi-Time-Programmable) zum Speichern von Gerätedeskriptoren und der vom Benutzer gewünschten CBUS-E/A-Konfiguration. Dieses Click-Board™ umfasst den vollständigen Funktionssatz der FT-X-Serie und ermöglicht die schnelle und einfache Integration von USB in ein Systemdesign über eine I2C-Schnittstelle.
Das USB-auf-I2C-2-Click-Board™ wird von einer mikroSDK-kompatiblen Bibliothek unterstützt, die Funktionen enthält, die die Softwareentwicklung vereinfachen. Dieses Click-Board™ wird als vollständig getestetes Produkt geliefert und ist bereit für den Einsatz auf einem System, das mit der mikroBUS™-Buchse ausgestattet ist.
How Does The USB to I2C 2 Click Board™ Work?
The USB to I2C 2 Click Board™ is based on the FT201X, a USB to I2C interface device which simplifies USB implementations from FTDI. The FT201X is USB 2.0 full-speed compatible and handles the entire USB protocol by itself; no USB-specific firmware programming is required. It fully integrates 2048 byte Multi-Time-Programmable (MTP) memory for storing device descriptors and CBUS I/O user-desirable configuration and clock generation with no external crystal required plus optional clock output selection enabling a glue-less interface to external MCU or FPGA.
The USB to I2C 2 Click Board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Standard Mode operation with a clock frequency of 100kHz and Fast Mode up to 400kHz. Since the FT201X for operation requires a 5V only, this Click board™ also features the PCA9306 voltage-level translator from Texas Instruments. The I2C interface bus lines are routed to the dual bidirectional voltage-level translator, allowing this Click board™ to work with both 3.3V and 5V MCUs properly.
The FT201X also contains an embedded fully integrated MTP memory used to specify the functionality of the Control Bus (CBUS) pins, the current drive on each signal pin, the current limit for the USB bus, and the descriptors of the device. There are six configurable CBUS I/O pins, two of which are routed on AN and INT pins of the mikroBUS™ socket, marked as CB0 and CB1, alongside the two blue LED indicators labelled as CBUS0 and CBUS1 used for optional user-configurable visual indication.
The other four CBUS pins can be found on the onboard CBUS header, and be used as user-configurable CBUS signals. A wide range and the way of using these pins can be found in the attached datasheet. This board also uses an active-low reset signal routed on the RST pin of the mikroBUS™ socket, which provides a reliable Power-On reset to the device's internal circuitry at Power-Up.
The USB to I2C 2 Click Board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
SPECIFICATIONS
Type | USB |
Applications | The USB to I2C 2 Click Board™ includes the complete FT-X series feature set and enables USB to be added into a system design quickly and easily over an I2C interface |
On-board modules | FT201X - full-speed USB to I2C protocol converter from FTDI |
Key Features | USB 2.0 full-speed compatible, entire USB protocol handled on the chip, integrated 2048 byte MTP memory, configurable CBUS I/O pins, and more |
Interface | I2C,USB |
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 of the USB to I2C 2 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
Control Pin 0 | CB0 | 1 | AN | PWM | 16 | NC | |
Reset | RST | 2 | RST | INT | 15 | CB1 | Control Pin 1 |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
LD2-LD3 | CBUSO-CBUS1 | - | User-Configurable LED Indicators |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | - | Unpopulated | User-Configurable CBUS Pins Header |
USB TO I2C 2 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Data Rate | - | - | 12 | Mbit/s |
CBUS Pins Output Current | 4 | - | 16 | mA |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the USB to I2C 2 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the USB to I2C 2 Click Board™ driver.
Key functions
-
usbtoi2c2_write_data
This function writes a desired number of data bytes by using I2C serial interface. -
usbtoi2c2_read_data
This function reads a desired number of data bytes by using I2C serial interface. -
usbtoi2c2_reset_device
This function resets the device by toggling the RST pin state.
Example Description
This example demonstrates the use of USB to I2C 2 click by echoing back all the received messages.
void application_task ( void )
{
uint8_t rx_data = 0;
if ( USBTOI2C2_OK == usbtoi2c2_read_data ( &usbtoi2c2, &rx_data, 1 ) )
{
if ( USBTOI2C2_OK == usbtoi2c2_write_data ( &usbtoi2c2, &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 The 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.USBtoI2C2
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. UART terminal is available in all MikroElektronika compilers.
MIKROSDK
The USB to I2C 2 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.
Software Support
We provide a library for the USB to I2C 2 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the USB to I2C 2 Click Board™ driver.
Key functions
-
usbtoi2c2_write_data
This function writes a desired number of data bytes by using I2C serial interface. -
usbtoi2c2_read_data
This function reads a desired number of data bytes by using I2C serial interface. -
usbtoi2c2_reset_device
This function resets the device by toggling the RST pin state.
Example Description
This example demonstrates the use of USB to I2C 2 click by echoing back all the received messages.
void application_task ( void )
{
uint8_t rx_data = 0;
if ( USBTOI2C2_OK == usbtoi2c2_read_data ( &usbtoi2c2, &rx_data, 1 ) )
{
if ( USBTOI2C2_OK == usbtoi2c2_write_data ( &usbtoi2c2, &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 The 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.USBtoI2C2
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. UART terminal is available in all MikroElektronika compilers.
MIKROSDK
The USB to I2C 2 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.