User Tools

Site Tools

한국어

cubloc:ekeypad:index

EKeyPad()

variable = EKeyPad( portblockIn, portblockOut)

variable Variable to store results (Returns Byte)
portblockIn Port Block to receive input (0 to 15)
portblockOut Port Block to output (0 to 15)

EKeyPad extends KeyPad to read up to 64 key inputs. Two port blocks are used to read a keypad matrix of up to 8×8 lines. The input port block and the output port block must be selected separately.

A pullup resistor (2.2K to 10K) should be connected between each input port and 5V. For ports not used within the input port block, a pullup resistor must be used. Unused ports may not be used for other purposes when using this command.

Ports not used within the output port block can be left unconnected. Unconnected ports may not be used for other purposes. The following is an example showing port block 0 as the input port block and port block 1 as the output port block:

If no keys are pressed, 255 will be returned. Otherwise, the pressed key’s scan code will be returned.

 i = Ekeypad(1,2)

Go CUBLOC home

cubloc/ekeypad/index.txt · Last modified: 2016/04/14 11:07 (external edit)