AN2575 Freescale Semiconductor / Motorola, AN2575 Datasheet - Page 20

no-image

AN2575

Manufacturer Part Number
AN2575
Description
MC68HC908EY16 ESCI LIN Drivers
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2575/D
/******************************************************************************
*
*
*
*
*
*
*
*
******************************************************************************/
void Format_line2 (void)
{
int remain;
long total;
volatile unsigned char BPD;
volatile unsigned char BD;
unsigned char PDFA;
}
20
total = 0;
for (count = 0; count < 16; count++)
{
}
remain = (thousand * total)/16/cnt1024;
Line2[7] = (remain%10) + 0x30;
for (count = 3; count != 0; count--)
{
}
if (Line2[3] == 0x30) { Line2[3] = 0x20; }
PDFA = tmpSCPSC & 0x1F;
remain = PDFA;
Line2[15] = (remain%10) + 0x30;
remain = remain/10;
Line2[14] = remain + 0x30;
if (Line2[14] == 0x30) Line2[14] = 0x20;
BPD = Prescaler [(SCBR/16) & 3];
BD =
remain = (bus_freq * thousand)/(2 * BPD * BD * (PD*32 + PDFA));
for (count = 12; count >= 8; count--)
{
}
if (Line2[8] == 0x30) { Line2[8] = 0x20; }
Function name: Format_line2
Originator:
Date:
Function:
total += delta_buffer[count];
remain = remain/10;
Line2[count+2] = (remain%10) + 0x30;
Line2[count] = (remain%10) + 0x30;
remain = remain/10;
Power_of2 [(SCBR & 7)];
P. Topping
26th March 2003
Format display of average frequency as a percentage of the
nominal frequency (0.1% resolution) and baud rate.
(the LIN temperature display is added by Read_LINtemp())
Freescale Semiconductor, Inc.
For More Information On This Product,
MC68HC908EY16 ESCI LIN Drivers
Go to: www.freescale.com
/* sum 16 deltas
/* average as % of nominal */
/* display tenths
/* and percentage
/* leading 0 becomes space */
/* ESCI pre. lower 5 bits
/* ESCI pre. lower 5 bits
/* display PSSB in decimal */
/* leading 0 becomes space */
/* display baud rate
/* leading 0 becomes space */
*/
*/
*/
*/
*/
*/
MOTOROLA

Related parts for AN2575