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: 2018-07-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: CAN
Downloaded: 5085 times
Not followed.
License: MIT license
ATA6570 click is an automotive diagnostic tool that allows CAN bus interfacing, in a series of click boards aimed towards automotive diagnostics.
Do you want to subscribe in order to receive notifications regarding "ATA6570 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "ATA6570 click" changes.
Do you want to report abuse regarding "ATA6570 click".
Library Description
This library carries generic functions for registers writing and generic functions for communication through CAN bus.
Key functions
void ata6570_writeReg( const uint8_t address, uint8_t input ) - Writes register
uint8_t ata6570_readReg( const uint8_t address ) - Reas register
void ata6570_writeByte(uint8_t input) - Sends single byte through CAN bus
uint8_t ata6570_readByte() - Reads byte received from CAN bus
uint8_t ata6570_byteReady() - Checks if new data has been received
Examples Description
The application is composed of three sections :
void applicationTask() { // RECEIVER #ifdef __RX__ if (ata6570_byteReady()) { tmp = ata6570_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } #endif // TRANSMITER #ifdef __TX__ uint8_t cnt; for (cnt = 0; cnt < 9; cnt++) { ata6570_writeByte( MESSAGE_DATA[cnt] ); } Delay_ms(2000); #endif }
MikroElektronika Libraries used in the example:
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.