AN2600 Freescale Semiconductor / Motorola, AN2600 Datasheet - Page 16

no-image

AN2600

Manufacturer Part Number
AN2600
Description
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2600/D
unsigned char MsgRcvd [2];
#pragma DATA_SEG DEFAULT
/******************************************************************************
*
*
*
*
*
*
*
*
******************************************************************************/
void main (void)
{
}
16
CONFIG1 = 0x09;
CONFIG2 = 0x00;
DDRA
DDRB
PTBPUE
TSC
OSCTRIM = 0;
asm cli;
LIN_Init();
PTA = 0x00;
for EVER
{
}
Function name: Main
Originator:
Date:
Function:
if (TSC_TOF)
{
}
= 0x08;
= 0x04;
= 0x7B;
= 0x00;
TSC_TOF = 0;
Read_Button ();
LIN_Msg ();
D.Svrcek
8th August 2003
The microprocessor is configured and initialized.
In the main never ending loop two functions are called,
‘Read-Button’ and ‘LIN_Msg’.
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
/* received data
/* disable COP
/* default (int. osc.)
/* enable port A outputs
/* LED: PTA3
/* enable port B outputs
/* KEYS: B0,B1,B3,B4,B5,B6 */
/* TX: PTB2
/* enable pullup on port B */
/* timer prescaler/1,start */
/* trim to max. frequency
/* enable interrupts
/* initialise LIN drivers
/* clear port A
/* is overflow flag set?
/* yes, clear it
/* read buttons on PTB
/* send and receive LIN msg*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*
*
*
*
*
*
*
*
MOTOROLA

Related parts for AN2600