I2C-auf-CAN-Click-Platine
I2C-auf-CAN-Click-Platine
Das I2C to CAN Click Board™ ist eine kompakte Zusatzplatine, die einen I2C to CAN-physischen Transceiver enthält, der einen Single-Master-I2C-Bus durch raue oder laute Umgebungen erweitert. Diese Platine verfügt über den LT3960, einen robusten Hochgeschwindigkeits-Transceiver, der einen Single-Master-I2C-Bus mithilfe der CAN-physischen Schicht von Analog Devices auf bis zu 400 kbit/s erweitert. Ein LT3960 aus SCL- und SDA-I2C-Leitungen erstellt äquivalente Differenzbusse (CAN) auf zwei verdrillten Paaren, während der zweite LT3960 den I2C-Bus lokal für alle Slave-I2C-Geräte am anderen Ende der verdrillten Paare neu erstellt. Ein integrierter 3,3-V-LDO versorgt die I2C- und CAN-Leitungen über eine einzelne Eingangsversorgung von 4 V bis 60 V.
Das I2C-zu-CAN-Click-Board™ eignet sich für Industrie- und Automobilnetzwerke, Remote-Sensoranwendungen und mehr.
How Does The I2C to CAN Click Board™ Work?
The I2C to CAN Click Board™ as its foundation uses the LT3960, I2C to CAN-Physical transceiver used to send and receive I2C data up to 400kbps using the CAN-Physical layer for differential signaling over twisted pair connections from Analog Devices. Using two integrated CAN transceivers, the LT3960 creates a differential proxy for each single-ended I2C clock and data signal capable of crossing harsh or noisy environments across two twisted pairs. Each transceiver consists of a transmitter and receiver, capable of quickly converting I2C dominant signal into a differential dominant signal and vice versa. Also, it extends functionality in environments with high common-mode voltages due to electrical noise or local ground potential differences.
The I2C to CAN Click Board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Fast Mode operation with a clock frequency up to 400kHz. The LT3960 provides a mode selection feature selectable via jumper labelled as MODE, where the user can choose between Master or Slave mode of operation. The SHD pin routed to the CS pin of the mikroBUS™ socket is used to put the LT3960 in a low-power Shutdown mode, disabling both the LDO and transceivers and allows selection between Master and Slave modes when enabled.
The selection between Master and Slave mode is performed by positioning the SMD jumper labelled as MODE to an appropriate position marked as SLV and MST. When a jumper is on the MST position, Master mode is selected, and the EN/MODE pin of the LT3960 is tied to a high logic state, while floating this pin, more precisely positioning the SMD jumper to an SLV position, allows the user to select Slave mode of operation.
The I2C to CAN Click Board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. Additionally, there is a possibility for the LT3960 power supply selection via jumper labelled as VIN SEL to supply the LT3960 from an external power supply terminal in the range from 4 to 60V or with VCC voltage levels from mikroBUS™ power rails. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
SPECIFICATIONS
Type | CAN |
Applications | Can be used for industrial and automotive networking, remote sensor applications, and more. |
On-board modules | LT3960 - I2C to CAN-Physical transceiver used to send and receive I2C data up to 400kbps using the CAN-Physical layer for differential signaling over twisted pair connections from Analog Devices |
Key Features | High speed I2C to CAN-physical transceiver, up to 400kbps I2C communications, up to 60V power supply, low current Shutdown mode, and more. |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V,External |
PINOUT DIAGRAM
This table shows how the pinout of the I2C to CAN Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
Shutdown | SHD | 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 |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | VIN SEL | Right | LT3960 Power Supply Voltage Selection VEXT/VCC: Left position VEXT, Right position VCC |
JP3 | MODE | Right | Slave/Master Mode Selection SLV/MST: Left position SLV, Right position MST |
I2C TO CAN CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | - | 5 | V |
Supply Voltage VIN | 4 | - | 60 | V |
Data Rate | - | - | 400 | kbps |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the I2C to CAN 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 I2C to CAN Click Board™ driver.
Key Functions
i2ctocan_cfg_setup
- Config Object Initialization function.i2ctocan_init
- Initialization function.i2ctocan_default_cfg
- Click Default Configuration function.
Example Description
This library contains API for the I2C to CAN Click Board™ driver. This demo application shows an example of an I2C to CAN wired to the VAV Press Click for reading differential pressure and temperature measurement.
void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ i2ctocan_cfg_t i2ctocan_cfg; /**< Click config object. */ // Logger initialization. LOG_MAP_USB_UART( log_cfg ); log_cfg.level = LOG_LEVEL_DEBUG; log_cfg.baud = 115200; log_init( &logger, &log_cfg ); log_printf( &logger, "rn" ); log_info( &logger, " Application Init " ); // Click initialization. i2ctocan_cfg_setup( &i2ctocan_cfg ); I2CTOCAN_MAP_MIKROBUS( i2ctocan_cfg, MIKROBUS_1 ); err_t init_flag = i2ctocan_init( &i2ctocan, &i2ctocan_cfg ); if ( init_flag == I2C_MASTER_ERROR ) { log_error( &logger, " Application Init Error. " ); log_info( &logger, " Please, run program again... " ); for ( ; ; ); } i2ctocan_default_cfg ( &i2ctocan ); log_info( &logger, " Application Task " ); Delay_ms( 100 ); log_printf( &logger, "--------------------------------rn" ); log_printf( &logger, " Set I2C Slave Address rn" ); i2ctocan_set_slave_address ( &i2ctocan, I2CTOCAN_VAV_PRESS_DEV_ADDR ); Delay_ms( 100 ); log_printf( &logger, "--------------------------------rn" ); log_printf( &logger, " Enable Device rn" ); log_printf( &logger, "--------------------------------rn" ); i2ctocan_enable_device( &i2ctocan ); Delay_ms( 100 ); }
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.I2cToCan
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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 I2C to CAN 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 I2C to CAN 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 I2C to CAN Click Board™ driver.
Key Functions
i2ctocan_cfg_setup
- Config Object Initialization function.i2ctocan_init
- Initialization function.i2ctocan_default_cfg
- Click Default Configuration function.
Example Description
This library contains API for the I2C to CAN Click Board™ driver. This demo application shows an example of an I2C to CAN wired to the VAV Press Click for reading differential pressure and temperature measurement.
void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ i2ctocan_cfg_t i2ctocan_cfg; /**< Click config object. */ // Logger initialization. LOG_MAP_USB_UART( log_cfg ); log_cfg.level = LOG_LEVEL_DEBUG; log_cfg.baud = 115200; log_init( &logger, &log_cfg ); log_printf( &logger, "rn" ); log_info( &logger, " Application Init " ); // Click initialization. i2ctocan_cfg_setup( &i2ctocan_cfg ); I2CTOCAN_MAP_MIKROBUS( i2ctocan_cfg, MIKROBUS_1 ); err_t init_flag = i2ctocan_init( &i2ctocan, &i2ctocan_cfg ); if ( init_flag == I2C_MASTER_ERROR ) { log_error( &logger, " Application Init Error. " ); log_info( &logger, " Please, run program again... " ); for ( ; ; ); } i2ctocan_default_cfg ( &i2ctocan ); log_info( &logger, " Application Task " ); Delay_ms( 100 ); log_printf( &logger, "--------------------------------rn" ); log_printf( &logger, " Set I2C Slave Address rn" ); i2ctocan_set_slave_address ( &i2ctocan, I2CTOCAN_VAV_PRESS_DEV_ADDR ); Delay_ms( 100 ); log_printf( &logger, "--------------------------------rn" ); log_printf( &logger, " Enable Device rn" ); log_printf( &logger, "--------------------------------rn" ); i2ctocan_enable_device( &i2ctocan ); Delay_ms( 100 ); }
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.I2cToCan
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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 I2C to CAN 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.
I2C-auf-CAN-Click-Platine
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.