TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136603 times)
  2. FAT32 Library (69806 times)
  3. Network Ethernet Library (55881 times)
  4. USB Device Library (46210 times)
  5. Network WiFi Library (41857 times)
  6. FT800 Library (41067 times)
  7. GSM click (28941 times)
  8. PID Library (26400 times)
  9. mikroSDK (26306 times)
  10. microSD click (25322 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

CAN FD click

Rating:

5

Author: MIKROE

Last Updated: 2020-01-24

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: CAN

Downloaded: 3370 times

Not followed.

License: MIT license  

CAN FD Click is a transceiver designed for HS CAN networks up to 5 Mbit/s in automotive and industrial applications. As an interface between the physical bus layer and the CAN protocol controller, the TLE9252V drives the signals to the bus and protects the microcontroller against interferences generated within the network.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "CAN FD click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "CAN FD click" changes.

Do you want to report abuse regarding "CAN FD click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

CAN FD click

CAN FD click

Native view of the CAN FD click board.

View full image
CAN FD click

CAN FD click

Front and back view of the CAN FD click board.

View full image

Library Description

The library covers all the necessary functions to control CAN FD click board. Library performs a standard UART communication.

Key functions:

  • canfd_byte_ready( ) - Write Single Byte
  • uint8_t canfd_read_byte( ) - Read Single Byte.
  • void canfd_set_operating_mode ( uint8_t op_mode ) - Set operating mode function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes UART, sets ERR ( INT ) pin as input and STB ( RST ) and EN ( CS ) pins as output, begins to write a log.
  • Application Initialization - Initialization driver enables - UART, performs an app mode, also write log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the CAN FD click board. This application task writes message data via UART. In the second case, checks if new data byte have received in RX buffer ( ready for reading ), and if ready than reads one byte from RX buffer. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
{
    char tmp;
    uint8_t drdy_flag;

    if ( app_mode == APP_MODE_RECEIVER )
    {
        // RECEIVER - UART polling

        drdy_flag = canfd_byte_ready( );

        if ( 1 == drdy_flag )
        {
            tmp = canfd_read_byte( );
            mikrobus_logWrite( &tmp, _LOG_BYTE );
        }
    }
    else
    {
        // TRANSMITER - TX each 2 sec
        mikrobus_logWrite( " TX data: ", _LOG_TEXT );
        Delay_ms( 1000 );
        
        for ( tmp = 0; tmp < 9; tmp++ )
        {
            canfd_write_byte( demo_message_data[ tmp ] );
            mikrobus_logWrite( &demo_message_data[ tmp ], _LOG_BYTE );
            Delay_ms( 200 );
        }

        mikrobus_logWrite( "------------------", _LOG_LINE );
        Delay_ms( 2000 );
    }
}

Other mikroE Libraries used in the example:

  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

AD SWIO click

0

AD-SWIO Click is a quad-channel software configurable input/output solution based on AD74412R. The AD74412R is a quad-channel software configurable input/output integrated circuit for building and process control applications.

[Learn More]

DMA Library

6

DMA is a powerful module that can autonomosly transfer data from memory to memory, memory to peripheral and peripheral to memory thus freeing up processor to do other tasks. This library provides routines for working with DMA module. A special thank you goes out to our valued associate Milos Markovic who helped in creating this package.

[Learn More]

WiFi 11 click

5

WiFi 11 Click is a compact add-on board that contains a WiFi and Bluetooth module that has dual bands for WiFi communication. This board features the BW16, a single-chip low-power dual bands Wireless LAN (WLAN) and Bluetooth Low Energy SoC module from Shenzhen B&amp;amp;T Technologies Co., Ltd.

[Learn More]