Example Application Using the DEMO9S08LC60
Interfacing an LCD to the MC9S08LC60, Rev. 0
Freescale Semiconductor
23
/*7*/ 0x18,0x01,
/*8*/ 0x56,0x34,
/*9*/ 0x52,0x34,
/*:*/ 0x10,0x80,
/*;*/ 0x00,0x00,
/*<*/ 0x00,0x00,
/*=*/ 0x00,0x00,
/*>*/ 0x00,0x00,
/*?*/ 0x00,0x00,
/*@*/ 0x00,0x00,
/*A*/ 0x56,0x30,
/*B*/ 0x56,0x34,
/*C*/ 0x16,0x04,
/*D*/ 0x16,0x34,
/*E*/ 0x56,0x4,
/*F*/ 0x56,0x0,
/*G*/ 0x16,0x24,
/*H*/ 0x46,0x30,
/*I*/ 0xa0,0x0,
/*J*/ 0x0,0x34,
/*K*/ 0xA0,0x3,
/*L*/ 0x6,0x4,
/*M*/ 0x7,0x31,
/*N*/ 0x7,0x32,
/*O*/ 0x16,0x34,
/*P*/ 0x56,0x10,
/*Q*/ 0x16,0x36,
/*R*/ 0x56,0x12,
/*S*/ 0x52,0x24,
/*T*/ 0xb0,0x0,
/*U*/ 0x6,0x34,
/*V*/ 0xe,0x1,
/*W*/ 0xa6,0x34,
/*X*/ 0x9,0x3,
/*Y*/ 0x81,0x1,
/*Z*/ 0x18,0x5,
/*[ */ 0x16,0x4,
/*\ */ 0x1,0x2,
/*] */ 0x10,0x34,
/*^ */ 0x3,0x00,
/*_ */ 0x00,0x4,
};
4.2.3.2.3
Scrolling a String Across the LCD Display — Scroll_String()
The example application provides the Scroll_String(tU08 *string, byte local_length) function to scroll an
alphanumeric character string across the LCD display. The complete source code for Scroll_String() can
be found in lcddrv.c. The Scroll_String() function accepts a string argument of length n, manipulates it,
and calls output_strg_lcd().
shows a specific example of how the string is manipulated by the
Scroll_String() function for a 5 character LCD display. In this example, the string argument provided to
the Scroll_String() function is “HELLO.” A call to the CLEAR_ALL_ALPNUM()function, a delay, and
a call to the output_strg_lcd() function are executed between each of the sequences.