AN2600 Freescale Semiconductor / Motorola, AN2600 Datasheet - Page 9

no-image

AN2600

Manufacturer Part Number
AN2600
Description
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Project Creation
MOTOROLA
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
A list of all the operations necessary to setup the LINmsg.c file is presented
here:
U8 volatile Message0x1A[2];
U8 volatile Message0x5B[2];
U8 volatile * MessagePointerTbl[] = {Message0x1A, Message0x5B};
U8 const near IdTbl[] = {0x1A, 0x5B};
U8 const near MessageCountTbl[] = {0x13, 0x03};
This section is a brief description of how to create a new project based on the
Motorola LIN QY/QT driver software. For more detail, see AN2599/D.
1. Create a message buffer for the frame data field of each application
2. Define a pointer array MessagePointerTbl[] containing pointers to all
3. Create an identifier table (array) IdTbl[] containing all IDs relevant to this
4. Finally, it is necessary to define an array variable MessageCountTbl[]. It
1. Create a new project in Metrowerks CodeWarrior development system.
2. Copy the Motorola LIN QY/QT driver software into the folder structure of
3. Add the Motorola LIN QY/QT driver software into the CodeWarrior
4. In the application source file (e.g., LIN_Keypad_QY.c), include the LIN
5. Define the messages in the LINmsg.c file as described in
Freescale Semiconductor, Inc.
For More Information On This Product,
message.
message buffers of the application.
node. Note that it must be set up in the same order as in the case of
MessagePointerTbl[] and MessageCountTbl[]. Furthermore, message
IDs must have parity bits included.
is a table which defines (for each existing message) a length of the frame
data and the checksum fields. It also indicates whether the specific
message should be sent or received. The least significant half-byte of
each entry denotes the length of the data and checksum fields (length of
the checksum field is equal to 1), and the most significant half-byte is
equal to 1 for message reception and 0 for transmission. In addition, it
could also be equal to 0xF (ignore), which means that the message is
ignored unless it has been updated since it was last read/written.
the project (for example into the folders lin_src and lin_inc). The driver
consists of LINapi.c, LINdriver.c, LINdriver.h, LINmsg.c, and
Tx_Config.h files.
project tree (for example into the folders Sources\Driver source and
Sources\Driver config).
driver with:
#include "LINdriver.h"
Configuration
Go to: www.freescale.com
File.
// ID 0x1A = 0x1A with parity
// ID 0x1B = 0x5B with parity
Application Software
LIN Message
AN2600/D
9

Related parts for AN2600