AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 63

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
#pragma TRAP_PROC
void PIT_ISR(void)
}
{
if(SystemFlags.bit.enableTimeout)
if(SystemFlags.bit.enableExternal)
}
{
if(REDTIMticks < REDTIMPeriod)
else
if(GREENTIMticks < GREENTIMPeriod)
else
if(AZ60.ptb.byte == ALL_LEDS_OFF)
}
{
if(EXTERNTIMticks < EXTERNTIMPeriod)
else
if(!AZ60.pte.bit.pte4)
}
if (!SystemFlags.bit.disableWaketime)
LIN_GetMsg(BROADCASTRECEIVE, MsgRcvd); //read the message
MsgHandlerTable[(MsgRcvd[0] & 0x0F)](); //call subroutine for appropriate command
WakeupTimeout = 0;
}
{
REDTIMticks++;
}
{
AZ60.ptb.byte |= RED_LED_MASK;
}
{
GREENTIMticks++;
}
{
AZ60.ptb.byte |= GREEN_LED_MASK;
}
SystemFlags.bit.enableTimeout = 0;
{
EXTERNTIMticks++;
}
{
AZ60.pte.bit.pte4 = 0;
}
SystemFlags.bit.enableExternal = 0;
{
:
:
:
:
:
:
PIT_ISR
TTZ740
none
none
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
//reset wakeup timeout
//check if timeout period for red LEDs has expired
//increment ticks
//switch off red LEDs
//check if timeout period for green LEDs has expired
//increment ticks
//switch off green LEDs
//check if timeout period for external LEDs has expired
//increment ticks
//switch off external LED
Slave Code – SLAVE08.C
Code Listings
63

Related parts for AN2103