|
||
| Description: | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A Hardware Object that scans a 4 row by 4 column set of switches and determines which switch is pressed. |
||||||||||||||||||||||||||||||||||||||||||
| Operation: | ||||||||||||||||||||||||||||||||||||||||||
An oKeypad Object splits I/O Group 1 (I/O lines 8 - 15) into 2 sets of 4 I/O lines. The least significant 4 I/O Lines are used for the keypad's 4 columns and the most significant 4 I/O Lines are used for the keypad's 4 rows. The 4 row lines are individually and sequentially set low (0-Volts) while the 4 column lines are used to read which switch is pressed within that row. A switch-press is detected when any one of the 4 column lines is shorted to any one of the row lines. The oKeypad Object handles all the required I/O logic. The keypad switch matrix requires no isolation diodes or pull up resistors for operation. When the Operate property is set to 1 the internal pull-up resistors on I/O lines 8 - 15 are activated and the keypad switch matrix is scanned for a switch-press. If any switch is pressed, the Value property is updated with the value of the switch and the Received property is set to 1. 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 Received 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 Value and Received property will remain unchanged from the values set at the time of the depression of the first key. Once all keys are released, the Received property will be cleared to 0. If the Mode property is set to 1, the Value of the switches is converted to a Phone-Pad style numbering system. In this mode, the value will reflect that actual numbers of the Phone-Pad. When the Operate property is set to 0 the switch matrix scanning is suspended until the Operate property is set back to 1. |
||||||||||||||||||||||||||||||||||||||||||
| Storage size & Availability: | ||||||||||||||||||||||||||||||||||||||||||
The following table lists the size and availability of the oKeypad Object:
|
||||||||||||||||||||||||||||||||||||||||||
| Properties: | ||||||||||||||||||||||||||||||||||||||||||
The following table lists the Properties of the oKeypad Object:
|
||||||||||||||||||||||||||||||||||||||||||
| Example: | ||||||||||||||||||||||||||||||||||||||||||
In the following example, the oKeypad Object is used.
|
||||||||||||||||||||||||||||||||||||||||||
| Also See: | ||||||||||||||||||||||||||||||||||||||||||
oKeyPadX - A Hardware Object that scans up to an 8 by 8 matrix of switches and determines which switch is pressed. |
||||||||||||||||||||||||||||||||||||||||||