mikroElektronika PIC Microcontrollers PIC12 User Manual page 246

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers
Ps2_Key_Read
Prototype
char Ps2_Key_Read(char *value, char *special, char *pressed);
Returns
Returns 1 if reading of a key from the keyboard was successful, otherwise 0.
Description
The function retrieves information about key pressed.
Parameter
tion marks, and space, value will store the appropriate ASCII value. Routine "recog-
nizes" the function of Shift and Caps Lock, and behaves appropriately.
Parameter
pressed is one of these, special will be set to 1, otherwise 0.
Parameter
Requires
PS/2 keyboard needs to be initialized; see
Example
// Press Enter to continue:
do {
if (Ps2_Key_Read(&value, &special, &pressed)) {
}
} while (1);
page
238
holds the value of the key pressed. For characters, numerals, punctua-
value
is a flag for special function keys (F1, Enter, Esc, etc). If key
special
is set to 1 if the key is pressed, and 0 if released.
pressed
if ((value == 13) && (special == 1)) break;
MikroElektronika: Development tools - Books - Compilers
or
Ps2_Init
Ps2_Config
mikroC
making it simple...
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents