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-12-28
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: CAN
Downloaded: 2344 times
Not followed.
License: MIT license
ATA6571 Click is a compact add-on board that contains a transceiver designed for high-speed CAN applications. This board features the ATA6571, a standalone high-speed CAN FD transceiver that interfaces a CAN protocol controller and the physical two-wire CAN bus from Microchip.
Do you want to subscribe in order to receive notifications regarding "ATA6571 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "ATA6571 click" changes.
Do you want to report abuse regarding "ATA6571 click".
Library Description
The library covers all the necessary functions to control ATA6571 Click board™. Library performs a standard UART interface communication.
Key functions:
void ata6571_set_operation_mode ( uint8_t op_mode )
- Set device operation mode function.void ata6571_write_byte ( uint8_t input )
- Write Single Byte.uint8_t ata6571_read_byte( void )
- Read Single Byte.Examples 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 = ata6571_byte_ready( );
if ( 1 == drdy_flag )
{
tmp = ata6571_read_byte( );
mikrobus_logWrite( &tmp, _LOG_BYTE );
}
}
else
{
// TRANSMITER - TX each 2 sec
for ( tmp = 0; tmp < 9; tmp++ )
{
ata6571_write_byte( demo_message_data[ tmp ] );
Delay_ms( 100 );
}
mikrobus_logWrite( " MESSAGE SENT! ", _LOG_LINE );
mikrobus_logWrite( "-------------------", _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.