Our new website is available at new.dizzy.co.za :-).

X
+27 (0)11 022 5323 +27 (0)64 681 8495
Basket/Checkout
R
- -
MagnifierSearch:
MCP2542 click (CAN) (Go to Parent Category)

MCP2542 click (CAN) MCP2542 click is a mikroBUS add-on board with a Microchip CAN FD Transceiver with Wake-Up Pattern. The physical layer is compliant with CAN 2.0 and CAN with Flexible Data Rate (CAN FD). It is designed specifically for high-speed CAN FD applications with communication speeds of up to 8 Mbps. Longer than usual BUS lengths are supported thanks to the improved maximum propagation delay.

The board has a standard RS232 port for CAN communications.

MCP2542 click communicates with the target board MCU through mikroBUS UART interface with an additional StandBy pin (STBY, in place of default mikroBUS AN pin). Two additional pairs of pins on the right edge of the board offer separate UART connection as well as a CAN interface.

The board is designed to use either a 3.3V or 5V power supply.
On SpecialOn SpecialOn Special R205  R490  Qty:
Price ex. VAT. Est. Weight: 40g. Stock: 8 available immediately [i]. mikroE Icon

MCP2542 click is the CAN bus transceiver, which allows TTL/CMOS level signals typically found on MCUs, to be used for the communication via the CAN bus, which uses the higher voltage levels and differential signals. In addition, this Click board™ protects the sensitive MCU part of the device from excessive voltage spikes and electrostatic discharges (ESD), typically observed in automotive systems, where the CAN communication is extensively used. This Click board™ uses the MCP2542WFD, a CAN FD transceiver, which offers robust CAN bus interface, with ESD protection up to ±13 kV, permanent dominant detection on TXD and CAN bus, battery short circuit and electrical transients suppression on the CAN bus, thermal protection, and more.

These features make the MCP2542 click an ideal solution for building high speed embedded CAN applications, which are reliable and well protected against rough conditions found in automotive electronic circuits. The onboard DE9 connector allows direct connection to most of the CAN systems, used by different manufacturers, reducing the application development time. It can be used for development of both automotive diagnostic applications, or custom vehicle gauges, panels, and similar additions, interfacing it directly to electronic automotive subsystems.

How does it work?

MCP2542 click uses the MCP2542WFD, a CAN FD transceiver IC with Wake-Up Pattern (WUP) option, from Microchip. This IC supports both CAN and recently established CAN FD protocols with up to 8Mbps. The communication through the CAN bus is differential and it is performed through the twisted pairs with the characteristic impedance of 120 ?. The differential lines are driven by the CANH and CANL drivers, integrated on the MCP2542WFD IC. This provides robustness and immunity to electromagnetic interferences, typically observed in automotive systems. The ISO 11898 standard defines a signal line of twisted-pair cable as the network topology, terminated by the resistors with the characteristic impedance of the CAN bus (120 ?), at both ends of the bus - in order to prevent signal reflection. This Click board™ does not need a termination resistor and includes additional protection on the CAN bus.

The CAN bus used two states: dominant and recessive. The dominant state is when the differential voltage between the CANH and CANL bus lines is above the dominant state detection level (0.9V), while the recessive state is below the recessive state detection level (0.5V). Allowed differential voltage on the CAN bus can range between -12V and 12V. CANH and CANL drivers are controlled by the logic level on the TX pin. HIGH logic level on the TX line results with the recessive state on the CAN bus, while LOW logic level results with the dominant state on the CAN bus. TXD line has the internal pull-up resistor (HIGH), making the MCP2542WFD device stay in recessive mode if the pin is left floating.

The CAN bus states are reflected on the RX pin: the dominant state will result in driving the RX pin to a LOW logic level, while the recessive state drives it to a HIGH logic level. This pin is also connected to the power supply via the internal pull-up resistor.

TX and RX lines of the MCP2542WFD are routed to the respective mikroBUS™ RX and TX pins, allowing MCU to drive CAN bus via UART. These lines are also routed to the header on the side of the Click board™, allowing them to be used with some other device. Besides TX and RX lines, CANH and CANL bus lines are also routed to a header, next to the RX and TX header. Finally, there is a D-SUB 9 male connector on the Click board™, which is used to connect to a CAN bus, directly. Logic level used for TX and RX lines is determined by the onboard SMD jumper, labeled as VIO SEL. It allows both 3.3V and 5V MCUs to be interfaced with this Click board™, determining the levels of the logic signals by the VIO pin of the MCP2542WFD. However, the power supply for the MCP2542WFD IC is taken directly from the mikroBUS™ 5V power rail.

The dominant/recessive states on the CAN bus are used for the message priority arbitration: the node which transmits signal with the higher priority (the lower the binary message identifier number, the higher the priority) will win the arbitration, and the node with the lower priority will abort the transmission, waiting for the bus to become available again. More detailed information about the CAN communication in general can be found in the link below.

Holding the TX pin to a LOW level for longer periods may result in blocking the traffic on the CAN bus since the dominant state overrides recessive states from other nodes on the bus (priority arbitration). This is avoided by employing the permanent dominant detection algorithm, which detects if the TX line is held LOW for too long. If so, the CANH and CANL drivers are disabled until the TX line state becomes HIGH. The receiver continues to work during this event.

The MCP2542WFD supports the Standby mode. While in Standby mode, high power consumption sections are powered off and only low-power part of the receiver is active, expecting the WUP (ISO11898-2 compliant Wake-Up Pattern) on the bus to resume the normal operation. The device can be set to the Standby mode by driving the STBY pin to a HIGH logic level. This pin is routed to the SMD jumper labeled as MODE SEL: if this jumper is set to STB position, the STBY pin will be routed to the mikroBUS™ AN pin, allowing MCU to control it. If the jumper is set to ON position, it will be routed to the GND directly, not allowing the MCP2542WFD device to enter the Standby mode.

Specifications

Type CAN
Applications It can be used for development of both automotive diagnostic applications, or custom vehicle gauges, panels, and similar additions, interfacing it directly to electronic automotive subsystems.
On-board modules MCP2542WFD, a CAN FD transceiver IC with Wake-Up Pattern (WUP) option, from Microchip
Key Features High speed CAN/CAN FD interface with data rate up to 8 Mbps, ESD protection up to ±13 kV, permanent dominant detection on TXD and CAN bus, battery short circuit and electrical transients suppression on the CAN bus, thermal protection, and more.
Key Benefits Increased maximum propagation delay allows longer bus lenghts
Interface UART
Input Voltage 3.3V,5V
Compatibility mikroBUS
Click board size L (57.15 x 25.4 mm)

Pinout diagram

This table shows how the pinout on MCP2542 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).

NotesPinMikrobus logo.pngPinNotes
Standby mode STB 1 AN PWM 16 NC
NC 2 RST INT 15 NC
NC 3 CS RX 14 TX UART TX (Transmit)
NC 4 SCK TX 13 RX UART RX (Receive)
NC 5 MISO SCL 12 NC
NC 6 MOSI SDA 11 NC
Power Supply +3V3 7 3.3V 5V 10 +5V Power Supply
Ground GND 8 GND GND 9 GND Ground

Onboard settings and indicators

LabelNameDefaultDescription
PWR PWR - Power LED indicator
JP 1 VIO SEL Left Logic level voltage selection: left position 3V3, right position 5V
JP 2 MODE SEL - Standby mode selection: ON position - Standby mode disabled, STB position - Standby mode set by the host MCU
STAT LD3 - Device status LED indicator

Additional pins

NameI/ODescription
CANL O CANL bus line driver
CANH O CANH bus line driver
TXD O UART TX (to CAN bus)
RXD I UART RX (from CAN bus)
CN1 I/O DE9 CAN bus male connector


Software support

We provide a library for MCP2542 click on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.

Library Description

Initializes and defines UART bus driver, and defines driver's functions for communication (reading and writing) between MCP2542 clicks.

Key functions:

  • void mcp2542_writeByte(uint8_t input) - Write Single Byte.
  • uint8_t mcp2542_readByte() - Read Single Byte.
  • uint8_t mcp2542_byteReady() - Check for new byte received.

Examples Description

The application is composed of three sections:

  • System Initialization - Initializes the UART module.
  • Application Initialization - Driver intialization.
  • Application Task - (code snippet) - Checks if new data byte has been received in the RX buffer (ready for reading), and if ready than reads one byte from the RX buffer. Otherwise, the application task writes message data via UART.
void applicationTask()
{
char tmp;
uint8_t rdyFlag;

// RECEIVER - UART polling

rdyFlag = mcp2542_byteReady();

if (1 == rdyFlag)
{
tmp = mcp2542_readByte();
mikrobus_logWrite( &tmp, _LOG_BYTE );
}

// TRANSMITER - TX each 2 sec

for (tmp = 0; tmp < 9; tmp++)
{
mcp2542_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 mikroE Libraries used in the example:

  • UART

Additional notes and information

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 by 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.

Downloads