AN2573 Freescale Semiconductor / Motorola, AN2573 Datasheet - Page 26

no-image

AN2573

Manufacturer Part Number
AN2573
Description
LINkits LIN Evaluation Boards
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2573/D
MC68HC908EY16 Slave Software Listings
/******************************************************************************
*
*
*
* Filename:
/net/sdt/vault-rte/cvsroot/lin/release/hc12star/sample/slave/slave.c,v $
* Author:
* Locker:
* State:
* Revision:
*
* Functions:
*
* History:
*
*
* Function:
*
*
*
*
*
*
*
*
*
*
*
******************************************************************************/
#pragma DATA_SEG SHORT _DATA_ZEROPAGE
/******************************************************************************
*
*
*
******************************************************************************/
#include "slave.h"
#include <linapi.h>
#define debounce 4
#define modecount 224
unsigned char data = 1;
unsigned char ID = 0;
unsigned char key_last;
unsigned char count;
unsigned char mode;
unsigned char LIN_data[2];
int keycount;
void Read_button (void);
26
Includes, defines, globals and function prototypes
Copyright (C) 2003 Motorola, Inc.
$RCSfile:
$Author: snl $
$Locker:
$State: Exp $
$Revision: 1.2 $
Sample application for LIN08EY16 LINKits Slave Driver
Use the RCS command log to display revision history
information.
Slave supplies a 2-byte response with a selectable ID.
The data in the lower nibble of the first byte is the
hexadecimal number displayed on the 4 LEDs. This number
can be incremented using the button on port A, bit 4.
The default ID is $29 with $2A, $2B & $28 selectable
using an ID comfiguration mode. This mode is entered by
holding the button down for 3 seconds. After this the
LEDs flash and display the ID (0:29, 1:2A, 2:2B, 3:28).
Pressing the button in this mode increments the ID.
After three seconds of no activity on the button, the
mode returns to normal.
$
Freescale Semiconductor, Inc.
For More Information On This Product,
LINkits LIN Evaluation Boards
Go to: www.freescale.com
All Rights Reserved
/* 13.3ms x (4+1) = 67ms
/* 13.3ms x (224+1) = 3s
*/
*/
*
*
*
MOTOROLA

Related parts for AN2573