| An oKeypad2 Object scans the I/O lines in I/O Group 1 (I/O lines 8 - 15) and the I/O lines in I/O group 3 for switched connections between the group's I/O lines. The set of I/O lines in I/O Group 1 are used for the keypad's 8 columns and the I/O lines in I/O group 3 are used for the keypad's 8 rows. Both the row and the column I/O groups have a mask that allows specific I/O lines within the groups to be selected for use. This option allows the keypad matrix to be any combination of rows and columns up to 8 by 8. As an example, if only 5 I/O lines are selected for the row and 4 bits are selected for the column, then the resulting scan pattern would scan a 5 by 4 keypad matrix which would contain 20 switches. If the total number of rows and columns is 8 or less as in the case of a 3 by 5 keypad, then the When the Operate property is set to 1 the keypad switch matrix is scanned for a switch-press. If any switch is pressed, the Key property is updated with the value of the switch and the Pressed property is set to 1. The value of the switch is calculated by (((Row - 1) * 8) + (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 Value 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 Pressed property will be 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 oFeedBack8 Object which is created when the oKeypad2 object is. The oKeypad2 object uses the oFeedBack8 Object to do the actual scanning of the keypad. (see oFeedBack8 Object for more detail on how the keypad is scanned.) |