AN2432 Freescale Semiconductor / Motorola, AN2432 Datasheet - Page 15

no-image

AN2432

Manufacturer Part Number
AN2432
Description
LIN Sample Application for the MC68HC908EY16 Evaluation Board
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
/******************************************************************************
*
*
*
******************************************************************************/
/******************************************************************************
*
*
*
******************************************************************************/
MOTOROLA
ID 20
ID 30
if (LIN_MsgStatus (0x20) != LIN_OK)
{
}
else
{
}
if (no_20 > 250)
{
}
else
{
}
if (LIN_MsgStatus (0x30) != LIN_OK)
{
}
else
{
}
if (no_20 < 251)
{
}
no_20 = 0;
PTA |= 0x60;
PTA &= ~(0x20);
LIN_GetMsg (0x20, Data_buf);
if (Data_buf[3] & 0x80)
{
}
else
{
}
if (no_30 < 251)
{
}
no_30 = 0;
no_20 ++;
PTA &= ~(0x40);
PTA |= 0x40;
no_30 ++;
LIN Sample Application for the MC68HC908EY16 Evaluation Board
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
/* new ID20 message ?
/* no, already over 250 ?
/* no, increment
/* yes, new 20 received
/* any 20s in last second? */
/* no, ID20 LEDs off
/* yes, ID20 LED on
/* and get data
/* check MS bit, last byte */
/* bit high, LED on
/* bit low, LED off
/* new ID30 message ?
/* no, already over 250 ?
/* no, increment
/* yes, new 30 received
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Software listing
AN2432/D
15

Related parts for AN2432