A SERVICE OF

logo

iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 80
6.2 Detail explanation for some demo
programs
6.2.1 Demo Keypad & LCD: Keypres.c
Purpose: This demo program shows how to control iVIEW-100 keypad &
LCD display, and show keypad’s ASCII code for future
programming control.
Lib included:
iVIEW.h & mmi100.h
Variables:
Name Type Default
Description
quit int 0 When quit=1, quit this program.
chr int For the input key value(ASCII code)
x int 1 Trace the X character position of LCD. X must
between 1 and 16.
y int 1 Trace the Y line position of LCD. Y must
between 1 and 8.
j int 0 Counter for data[j] array. j must <10
data[10] char Array for storing input value.
Program :
#include <iVIEW.H>
#include <mmi100.H>
void main()
{
int quit=0;
int chr;
int x=1;
int y=1;
int j=0;
char data[10];
InitLib(); /* initial LIB */