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-05-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: CAN
Downloaded: 2839 times
Not followed.
License: MIT license
The CAN FD 4 Click is a Click board that features the NCV7344D10R2G, a Controller Area Network (CAN) transceiver, from ON Semiconductor.
Library Description
Library provides functions for communication via UART module, and a function for controlling cs pin, which sets device mode.
Key functions:
void canfd4_write_byte ( uint8_t input )
- Writes single byte of datauint8_t canfd4_read_byte( )
- Reads single byte of datauint8_t canfd4_byte_ready ( )
- Checks if new data ic receivedExamples description
The application is composed of three sections :
void application_task ( )
{
char tmp;
uint8_t drdy_flag;
if ( app_mode == APP_MODE_RECEIVER )
{
// RECEIVER - UART polling
drdy_flag = canfd4_byte_ready( );
if ( 1 == drdy_flag )
{
tmp = canfd4_read_byte( );
mikrobus_logWrite( &tmp, _LOG_BYTE );
}
}
else
{
// TRANSMITER - TX each 2 sec
for ( tmp = 0; tmp < 9; tmp++ )
{
canfd4_write_byte( demo_message_data[ tmp ] );
mikrobus_logWrite( ">> MESSAGE SENT <<", _LOG_LINE );
}
Delay_ms(2000);
}
}
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.
IR Grid 3 click is a thermal imaging sensor. It has an array of 768 very sensitive, factory calibrated IR elements (pixels), arranged in 32 rows of 24 pixels, each measuring an object temperature up to 300ËšC within its local Field of View (FOV).
[Learn More]SRAM 3 Click is a 1Mb serial SRAM with a non-volatile SONOS storage element included with each memory cell, organized as 128k words of 8 bits each. This board features the ANV32AA1WDK66 a SRAM memory from Anvo-System Dresden.
[Learn More]Barometer 3 Click is a compact add-on board for applications which require digital barometric air pressure measurement. This board features the DPS368, a digital barometric air pressure sensor from Infineon.
[Learn More]You have unsaved changes. If you choose to leave all changes will be discarded.
Do you want to subscribe in order to receive notifications regarding "CAN FD 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "CAN FD 4 click" changes.
Do you want to report abuse regarding "CAN FD 4 click".