User manual

Table Of Contents
344
mikoC PRO for PIC32
MikroElektronika
Keypad Library
The mikroC PRO for PIC32 provides a library for working with 4x4 keypad. The library routines can also be used with
4x1, 4x2, or 4x3 keypad. For connections explanation see schematic at the bottom of this page.
External dependencies of Keypad Library
The following variable must be dened
in all projects using Keypad Library:
Description: Example:
extern sfr unsigned int
keypadPort;
Keypad Port.
unsigned keypadPort at PORTB;
Library Routines
- Keypad_Init
- Keypad_Key_Press
- Keypad_Key_Click
Keypad_Init
Prototype
void Keypad_Init();
Description Initializes given port for working with keypad.
Parameters None.
Returns Nothing.
Requires Global variable:
- keypadPort - Keypad port
must be dened before using this function.
Example
// Keypad module connections
char unsigned at PORTB;
// End of keypad module connections
...
Keypad_Init();
Notes The Keypad library uses lower byte (bits <7..0>) of keypadPort.