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: 2019-12-16
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: LIN
Downloaded: 2915 times
Not followed.
License: MIT license
The Dual LIN click is a Click boardâ„¢ based on the TLE7268SKXUMA1, a Dual LIN transceiver from Infineon. Given the features included in this transceiver, the Dual LIN transceiver designed for data transmission rates up to 20 kbps being fully compliant to the ISO17987-4, LIN specification 2.2A and SAE J2602 standards.
Do you want to subscribe in order to receive notifications regarding "Dual LIN click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Dual LIN click" changes.
Do you want to report abuse regarding "Dual LIN click".
Library Description
The library includes functions to write or read data from UART. You can set state of pins(RST - BUS1, CS - BUS2) you want to change it, and get state of pin(INT - INH).
Key functions:
void duallin_write_byte ( uint8_t input )
- Write single byte of datauint8_t duallin_read_byte ( void )
- Read single byte of datauint8_t duallin_byte_ready ( void )
- Check for new byte receiveduint8_t duallin_bus1_status ( uint8_t state )
- Sets state of bus1 pinExamples description
The application is composed of three sections :
void applicationTask( )
{
uint8_t tmp;
char rec;
uint8_t rdyFlag;
uint8_t mode = DUALLIN_WRITE_MODE;
if ( mode == DUALLIN_READ_MODE )
{
// RECEIVER - UART polling
rdyFlag = duallin_byte_ready( );
if ( DUALLIN_DATA_READY == rdyFlag )
{
rec = duallin_read_byte( );
mikrobus_logWrite( &rec, _LOG_BYTE );
}
}
else if ( mode == DUALLIN_WRITE_MODE )
{
// TRANSMITER - TX each 2 sec
for ( tmp = 0; tmp < 11; tmp++ )
{
duallin_write_byte( MESSAGE_DATA[ tmp ] );
if ( tmp < 6 )
{
Delay_ms( 100 );
}
}
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.