EVM5509 Keypad Module
This module allows you to read the value of the switches and potentiometers on the EVM5509A’s keypad/display module. The keypad/display module must be connected to the EVM5509A when the board is powered up.
EVM5509_KEYPAD_init()
Description
Initialize keypad/display
Required Headers
evm5509.h
evm5509_keypad.h
Required Libraries
evm5509bsl.lib
Function Prototype
void EVM5509_KEYPAD_init()
Parameters
None
Return Value
None
Example
/* Initialize keypad/display module */
EVM5509_KEYPAD_init();
EVM5509_KEYPAD_readKey()
Description
Reads the value of the switches on the keypad/display module.
Required Headers
evm5509.h
evm5509_keypad.h
Required Libraries
evm5509bsl.lib
Function Prototype
Uint16 EVM5509_KEYPAD_readKey()
Parameters
None
Return Value
1-9 - if a switch is pressed, 0 if no keys are pressed
Example
/* Read current key value */
keyval = EVM5509_KEYPAD_readKey();
EVM5509_KEYPAD_readPot()
Description
Reads the value of the potentiometers on the keypad/display module
Required Headers
evm5509.h
evm5509_keypad.h
Required Libraries
evm5509bsl.lib
Function Prototype
Uint16 EVM5509_KEYPAD_readPot(Int16 potnum)
Parameters
potnum – 1 for potentiometer #1, 2 for potentiometer #2
Return Value
12-bit value read from analog/digital converter connected to potentiometer.
Example
/* Read value of potentiometer #1 */
potval = EVM5509_KEYPAD_readPot(1);
|