How does it work?
CAN Bus Click as its foundation uses the MAX13054, ±80V fault-protected CAN-transceiver ideal for industrial network applications that require overvoltage protection from Analog Devices. The MAX13054 provides a link between the CAN protocol controller and the physical wires of the bus lines in a control area network (CAN). These devices can be used for DeviceNet applications, requiring data rates up to 1Mbps. Its input common-mode range is greater than ±12V, exceeding the ISO11898 specification of -2V to +7V, and features ±8kV Contact Discharge protection, making these devices ideal for harsh industrial environments.
Its dominant timeout feature prevents the bus from being blocked by MCU. If the TXD input is held low for greater than 1ms, the transmitter becomes disabled, driving the bus line to a recessive state. In Standby mode, when STB pin routed on the AN and INT pin of the mikroBUS™ socket is set to a high logic state, the transmitter is switched off, and the receiver is switched to a low-current/low-speed state. Activation of Standby mode is possible by setting the onboard SMD jumper labeled as STBY SEL to an appropriate position marked as STB or GND.
The MAX13054 communicates with MCU using the UART interface with the default baud rate of 115200 bps for the data transfer. In addition to UART communication pins from the mikroBUS™ socket, the user can connect the TX/RX signals directly through the UART External header on the right edge of the board. This Click board™ comes equipped with the standard DB-9 connector, making interfacing with the CAN bus simple and easy. Besides, the user can connect the CAN signals directly through the CAN External header, also on the left edge of the board.
The external power supply in a range from 2.7V to 16.5V, next to the D-9 connector, can also be brought to the header labeled BATT on the board’s left side. Through SMD jumpers labeled as 3V3 JMP and 5V JMP, the MAX1658/59 from Analog Devices LDOs output voltages can power up the mikroBUS™ 3.3V and 5V power rails. This feature makes the MAX13054 ideal for many different applications, including those in the automotive market. However, it should be noted that Mikroe does not advise powering up their systems this way. That is why these jumpers are left unpopulated by default.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the UART communication lines properly. 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 harsh industrial environments and industrial network applications where overvoltage protection is required
On-board modules
MAX13054 – ±80V fault-protected CAN-transceiver ideal for industrial network applications that require overvoltage protection from Maxim Integrated
Key Features
Fully compatible with the ISO11898 standard, ±80V fault protection, high-speed operation of up to 1Mbps, low-current Standby mode, transmit data dominant timeout, and more.
Interface
UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V,External
Pinout diagram
This table shows how the pinout on CAN Bus 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 |
JP1 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | STBY SEL | Left | Low-Current Standby Mode Selection STB/GND: Left position STB, Right position GND |
JMPR1 | 3V3 JMP | Unpopulated | 3V3 LDO Jumper |
JMPR2 | 5V JMP | Unpopulated | 5V LDO Jumper |
J1 | BATT | Unpopulated | External Power Supply Header |
J2 | UART | Unpopulated | External UART TX/RX Lines Header |
J3 | CAN | Unpopulated | External CANH/CANL Lines Header |
CAN Bus Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VIO | 3.3 | – | 5 | V |
External Supply Voltage BATT | 2.7 | – | 16.5 | V |
Receiver inputs voltage range | – | – | 1 | Mbps |
Receiver inputs voltage range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the CanBus Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
This library contains API for CanBus Click driver.
Key functions:
canbus_cfg_setup
– Config Object Initialization function.canbus_init
– Initialization function.canbus_default_cfg
– Click Default Configuration function.
Examples description
This library contains API for CAN Bus click board™. This example transmits/receives and processes data from CAN Bus click. The library initializes and defines the UART bus drivers to transmit or receive data.
The demo application is composed of two sections :
void application_task ( void ) { #ifdef TRANSMIT canbus_send_data( &canbus, demo_message ); log_printf( &logger, "t%s", demo_message ); Delay_ms( 2000 ); log_printf( &logger, "------------------rn" ); #endif #ifdef RECIEVER canbus_process( ); if ( app_buf_len > 0 ) { log_printf( &logger, "%s", app_buf ); canbus_clear_app_buf( ); } #endif }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.CanBus
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.