External Keypad support
|Top Previous Next|
The EM2000 module supports both matrix and binary keypads. A typical matrix keypad is shown on the schematic diagram below:
Due to flexible scan and return line mapping provided by the keypad (kp.) object, you can assign any combination of GPIO lines to connect to your keypad. Up to 8 scan and 8 return lines can be assigned. On the EM2000 module, all scan line must be configured as outputs, and all return lines — as inputs.
To build a keypad you will need to have at least one return line. A sensible count of scan lines, however, starts from two! Having a single scan line is like having no scan lines whatsoever — you might just as well ground this single scan line, i.e. always keep it active:
Scan lines can optionally perform the second function of driving LEDs. One such LED can be connected to each scan line, preferably through a buffer, as shown on the diagram below. These LEDs can be used for any purpose you desire — and this purpose can be completely unrelated to the keypad itself.
If the LEDs are connected as shown on the diagram, you will turn them ON by settings their corresponding control lines LOW.
Binary keypads (i.e. "keypads that output binary key codes") do not require scanning — they contain a (typically microcontroller-based) circuit that performs the scanning and outputs encoded binary codes of pressed keys. Such keypads are sometimes called "encoded keypads":
The EM2000 can work with binary keypads incorporating up to 8 data lines.
For more information see I/O (io.) and keypad (kp.) objects. They are documented in the "Programmable Hardware Manual".