![NXP Semiconductors MC9S08LC60 Manual Download Page 21](http://html.mh-extra.com/html/nxp-semiconductors/mc9s08lc60/mc9s08lc60_manual_1721925021.webp)
Example Application Using the DEMO9S08LC60
Interfacing an LCD to the MC9S08LC60, Rev. 0
Freescale Semiconductor
21
//===========================
//Define LCD duty cycle
//===========================
#define DUTY1BY2 0
#define DUTY1BY3 0
#define DUTY1BY4 1
Using the directive-defined variables in lcddrv.h, cpu.h, and sci.h, the demo and the LCD module
configuration can be changed quickly.
4.2.3.2
LCD Methods
The functions listed in this section manage the displaying and clearing of segments in the LCD display
during the execution of the program. The functions manage either
non-alphanumeric (icons, labels, etc.)
or alphanumeric (13-segment display group) segments.
4.2.3.2.1
Non-alphanumerics
The functions available to handle
non-alphanumerics
are provided below. In this implementation, the
non-alphanumerics were grouped into functional categories. The selection of the grouping is not important
from an application standpoint.
For the non-alphanumerics, these functions also allow the setting of the blink mode for those individual
segments. The lcdramm variable tells the function if the LCDRAM[20:0] bits control the display on/off
function or the blink enable on/off function. When calling these functions with lcdramm set to
SEGONOFF, the LCDRAM[20:0] bits control the display on/off function; when calling these functions
with lcdramm set to SEGBLINKEN, the LCDRAM[20:0] bits control the blink enable on/off function.
void SET_LOGO(char lcdramm, char k);
void SET_VOL(char lcdramm, char v, byte numbars);
void SET_BATT(char lcdramm, char t, byte numbars);
void SET_POWERSAVE(char lcdramm, char p);
void SET_TIMESEGS(byte lcdramm, byte am, byte pm, byte k3);
void SET_TEMPSEGS(byte lcdramm, byte k1, byte k2, char col4);
void SET_DMMLABLES(char lcdramm, char kwatt, char volt, char amp, char om) ;
void SET_COLONS(char lcdramm, char col1, char col2, char col3, char dt) ;
void SET_DECIMALS(char lcdramm, char dt1, char dt2, char dt3, char dt4, char dt5, char
dt6, char dt7, char dt8, char dt9);
void SET_MENU(char lcdramm, char lab1, char lab2, char lab3, char lab4, char lab5, char
lab6, char lab7);
The functional arguments after the lcdramm argument point to individual bits in the LCD RAM. In most
cases, the variable name shown matches the LCD panel label for the segments. For example, “k” in
SET_LOGO(char lcdramm, char k) points to the Freescale logo segment. To control the on/off state, an
ON and an OFF variable are provided. An example of the typical usage of these functions is provided
below:
//Configure the display of am label, pm label and clock icon
SET_TIMESEGS(SEGONOFF, OFF,ON,ON); //am label is OFF while pm label and clock icon are ON
//Configure the blink enable of am label, pm label and clock icon
SET_TIMESEGS(SEGBLINKEN, OFF,ON,ON); //pm label & clock icon are configured to blink