A SERVICE OF

logo

iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 52
Here is the content of LCD.c:
#include <iVIEW.H>
#include <mmi100.H>
void main()
{
int quit=0;
char c;
InitLib();
InitLCD();
TextOutAt(5,3, "CHOOSE:");
TextOutAt(5,5, "1.LCD");
TextOutAt(5,6, "2.QUIT");
while(!quit)
{
c=Getch();
switch(c)
{
case '1':
LCDSetToPage (2);
ClrScrn();
TextOutAt(3,4, "* welcome *");
TextOutAt(1,8, "any key to back");
Getch(); break;
case '2':
quit=1; break;
}
LCDSetToPage (1);
}
ClrScrn();
CloseLCD();
}
Include these two headers to use
iVIEW
-
100
s user functions.
Initail libraries & iVIEW LCD.
Print “CHOOSE” on LCD (5,3),
“1.LCD” on (5,5), “2.QUIT” on (5,6)
from LCD left top. This menu display
is stored in page 1 by default.
Wait for key press to get char c. Both
iVIEW keypad and PC key board can
access this program.
Set LCD to page 2. From this line, the
LCD will store display to page 2.
C
lear LCD.
Print “welcome” message on LCD
(3,4) & (1,8). This is page 2.
Call page 1 back as the main menu.