AN2600 Freescale Semiconductor / Motorola, AN2600 Datasheet - Page 5

no-image

AN2600

Manufacturer Part Number
AN2600
Description
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Software
MOTOROLA
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
The project software must serve the application keypad and share the keypad
status via the LIN network. Therefore, it is necessary to define a specific ID
(six-bits-long) for each message, which will be used for reception or
transmission. The message ID is written in a hexadecimal format with the parity
bits included. According to the LIN specification, the data field can be 1 to 8
bytes long (for LIN 1.2 and newer).
Because the application is for demo purposes only, it uses two LIN messages
(both 2-bytes long), one for reception and the second for transmission. In the
transmitted message, the first data byte corresponds to the buttons currently
pressed, and the second byte carries information about buttons pressed down
for longer than three seconds.
The slave also receives a respective message from the master. The LSB of the
first data byte is thus used to control the LED of the keypad.
This application is based on the Motorola LIN QY/QT driver software described
in AN2599/D: Generic LIN Driver for MC68HC908QY4. This driver establishes
all LIN connectivity related tasks within the project, and it is available free of
charge from the Motorola LIN website:
www.motorola.com/semiconductors/LIN.
An interface between the LIN driver and the application is done by using two
API functions:
For more details about these two functions as well as the driver
implementation, please see AN2599/D.
Freescale Semiconductor, Inc.
For More Information On This Product,
0x1A
0x1B
ID
LIN_PutMsg() — loads data into message buffer to be sent to the master
LIN_GetMsg() —used for receiving data from the master.
Go to: www.freescale.com
ID with
Parity
0x1A
0x5B
Table 1. Application Messages
Keypad slave
Sender
Master
[Bytes]
Length
2
2
Application Software
See
See
Message
Data
Table 3
Table 2
AN2600/D
5

Related parts for AN2600