KEYPAD4x4

Since: V1.0

Description

Pinout

Properties

Usage Examples

Datasheets

Description

The KEYPAD4x4 component consists of a 4 x 4 array of touch switches. The KEYPAD has four column connect pins (C1,C2,C3,C4) and four row pins (R1,R2,R3,R4). Each switch is connected to one column and one row connection pin such that each (row, column) combination is unique for each switch. The appearance of the KEYPAD component is determined by the KEYMASK  property which contains a string of the key characters used on the key faces. The currently activated switch is determined by the KEYON property where KEYON = 0 when no switch is connected and KEYON = 1 to 16 when a valid switch is activated. KEYPAD is a user interactive component. Clicking on individual keys will activate the switch for that key. When active the background of the key becomes light green in color giving a visual clue to the state of the key. Only one switch can be active at any one time. Clicking on the currently active switch will toggle the switch to off resulting in no key being selected and KEYON = 0. When a key is on its switch becomes active creating a short-circuit across the unique row, column connection pin combination for that key.

Pinout

Pin Name Description
1 C1

Column 1 Connection

2 C2

Column 2 Connection

3 C3

Column 3 Connection

4 C4

Column 4 Connection

5 R4

Row 4 Connection

6 R3

Row 3 Connection

7 R2

Row 2 Connection

8 R1

Row 1 Connection

Properties 

Property Default Value Options Description Since
Keyon 0 0..16

Currently active key.

KEYON = 4 * (ROW-1) + COL

ROW = INT(KEYON / 4)

COL = ((KEYON-1) MOD 4 ) + 1

1.0
Keymask 123F456E789D10BC None 16 character string containing the key-face character for each KEY 1 to 16. 1.0
Bouncing TRUE
TRUE
FALSE
? 1.1

Usage Examples

Usage 1: Keypad with decoder

In this example, a keypad decoder is used to decode the keypad directly. A PIC16c54 microprocessor samples each of the row, column combination to determine the currently pressed key.

Screenshot

Usage_Keypad4x4-1.vbb

DataSheets

 V1.0 Helpdoc PDF