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]
Rating:
Author: MIKROE
Last Updated: 2020-03-06
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: CAN
Downloaded: 2741 times
Not followed.
License: MIT license
CAN FD 3 Click is a add-on board based on TLE9251V CAN network transceiver, designed for HS CAN networks up to 5 Mbit/s in automotive and industrial applications.
Do you want to subscribe in order to receive notifications regarding "CAN FD 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "CAN FD 3 click" changes.
Do you want to report abuse regarding "CAN FD 3 click".
Library Description
Library provides functions for communication via UART module, and a function for controlling cs pin, which sets device mode.
Key functions:
void canfd3_write_byte ( uint8_t input )
- Writes single byte of datauint8_t canfd3_read_byte( )
- Reads single byte of datauint8_t canfd3_byte_ready ( )
- Checks if new data ic receivedvoid canfd3_set_cs_pin ( uint8_t mode )
- Sets state of the CS pinExamples description
The application is composed of three sections :
void application_task ( )
{
float read_data;
char txt_out[ 30 ];
read_data = thermo17_read_temp( THERMO17_TEMPERATURE_LOCAL );
FloatToStr( read_data, txt_out );
mikrobus_logWrite( " - LOCAL: ", _LOG_TEXT );
mikrobus_logWrite( txt_out, _LOG_LINE );
Delay_ms( 100 );
read_data = thermo17_read_temp( THERMO17_TEMPERATURE_REMOTE );
FloatToStr( read_data, txt_out );
mikrobus_logWrite( " - REMOTE: ", _LOG_TEXT );
mikrobus_logWrite( txt_out, _LOG_LINE );
Delay_ms( 100 );
mikrobus_logWrite( " ******************** ", _LOG_LINE );
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
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.