User`s manual

PK2200 Software Reference s 55
LCD and Keypad
The following functions provide routines for writing to the LCD and
reading the keypad.
Include the following directives in your program if using the PK2240.
#use wintek.lib
#use kp.lib
The following directives provide information to the compiler about the
graphic LCD and keypad on the PK2240.
void lc
_
init
_
keypad()
Initializes timer1, keypad driver, and variables, and, if used, the real-
time kernel.
RETURN VALUE: None.
int lc
_
kxget (byte mode)
Fetches the key value from the FIFO keypad buffers. If mode = 0, value
is removed from the buffer; otherwise, value remains in the buffer.
RETURN VALUE: Key value or -1, if no key is available.
The Keypad and LCD section in Chapter 4 describes
key values.
void lc
_
kxinit()
Initialize the keypad driver and accessory variables. If virtual watch-
dogs are defined the virtual watchdogs are initialized.
RETURN VALUE: None.
void lc
_
setbeep (int count)
Sounds the beeper for the number of 1280 Hz cycles specified by
count.
RETURN VALUE: None.
up
_
beep (int milliseconds)
Sets beeper on for specified number of milliseconds. Scaling of the
count passed is dependent on the periodic routines that calls
lc_beepscan. If BeepScale is undefined, it is defaulted to 0.04.
RETURN VALUE: None.
void lc
_
char (char ch)
Sends a character to the LCD. The function waits for the LCD to
become free before sending the character.
RETURN VALUE: None
$