Site Index
   Home
   File Upload
Google

Transfer Site
Main Site

EVM5502 Keypad Module

This module allows you to read the value of the switches and potentiometers on the EVM5502s keypad/display module. The keypad/display module must be connected to the EVM5502 when the board is powered up.

Function Description
EVM5502_KEYPAD_readKey Reads the value of the switches on the EVM5502s keypad/display module
EVM5502_KEYPAD_readPot Reads the value of the potentiometers on the EVM5502s keypad/display module

EVM5502_KEYPAD_readKey()

Description
Reads the value of the switches on the EVM5502s keypad/display module.

Required Headers
evm5502.h
evm5502_keypad.h

Required Libraries
evm5502bsl.lib

Function Prototype
Uint16 EVM5502_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 = EVM5502_KEYPAD_readKey();

EVM5502_KEYPAD_readPot()

Description
Reads the value of the potentiometers on the EVM5502s keypad/display module

Required Headers
evm5502.h
evm5502_keypad.h

Required Libraries
evm5502bsl.lib

Function Prototype
Uint16 EVM5502_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 = EVM5502_KEYPAD_readPot(1);
©Copyright 2002-2011 Spectrum Digital, Inc. All Rights Reserved.