|
A Hexadecimal keypad has the numbers 0 to 3 on the first row and C to F on the last row. For keypads that are arranged like the keypad on a telephone, use the oKeypadP Object. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the size and availability of the oKeypad Object.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
An oKeypad Object uses I/O Group 1 to read a 4 x 4 matrix of buttons. 4 of the I/O Lines are used for the keypad's 4 columns and 4 I/O Lines are used for the keypad's 4 rows. The keypad switch matrix requires no isolation diodes or pull up resistors for operation. When the Operate property is set to 1 the 4 x 4 matrix of keys is scanned. If any switch is pressed, the Key property is updated with the value of the switch and the Pressed property is set to 1. Note that the value of the Key property is not necessarily the number printed on the key. Instead, the value of the switch is calculated by (((Row - 1) * 4) + (Column-1)). If two switches are pressed simultaneously the switch with the highest value will be used. The Pressed property will remain at 1 so long as at least 1 switch is depressed. If a second key is pressed before the originally pressed key is released, the Key and Pressed property will remain unchanged from the values set at the time of the depression of the first key. Once all keys are released, the Key property is cleared to 0. When the Operate property is set to 0 the switch matrix scanning is suspended until the Operate property is set back to 1. The FeedBack property is an instance of the oFeedBack4 Object which is created when the oKeypad Object is. The oKeypad Object uses the oFeedBack4 Object to do the actual scanning of the keypad. (see oFeedBack4 Object for more detail on how the keypad is scanned.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the properties of the oKeypad Object:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the methods:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In the following example, the oKeypad Object is used.
Also See: Application Note #1: Using the oKeypad Object to read a Matrix Keypad. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The hex keypad switch matrix requires no isolation diodes or pull up resistors for operation since the IOLines 8-15 already have internal pull-ups on them. Connect the first set 4 wires of IOGroup 1 to C1 to C4 and the second set of 4 wires of IOGroup 1 to R1 to R8.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists objects with related functions
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Firmware Ver A1: Introduced. Bugs: No known bugs. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||