|Top Previous Next|
The TEV-KB0 board carries 16 keys and 4 green LEDs. The keys are arranged as a 4x4 matrix, with 4 scan lines and 4 return lines. Each scan line additionally controls one green LED. Schematic diagram of the TEV-KP0 board can be found on Tibbo website.
TEV-LBx Board Connector
The TEV-KB0 board is connected to the TEV-MB0 motherboard through a 2x12-pin connector. Each two pins of the connector are combined together for better electrical contact. Therefore, the connector effectively has 12 lines.
* I/O pins of the EM1000 module
Required initialization code in Tibbo BASIC/C application
This section assumes that you are familiar with Tibbo BASIC/C and TIDE software. These are documented in the "TIDE and Tibbo BASIC Manual".
For correct board operation, click Project-> Settings, and select "EM1000" or "EM1000G" platform. Additionally, click Customize to open a Customize Platform dialog. In the dialog, double-click the Keypad (kp.) Object line and choose "Enabled".
The following initialization code should also be added to your project:
All key-related events are served in the event handler for the on_kp() event. The key_code argument carries the code of the key. Keycodes of each key are indicated in parentheses on the drawing above. For example, key <5> has the code of 12Hex.
Each scan line of the keypad also controls one LED. To turn the LED on, set the corresponding scan line LOW. This will not affect the operation of the keypad.