TS-7250-V3 DIO Header: Difference between revisions
From embeddedTS Manuals
No edit summary |
No edit summary |
||
Line 71: | Line 71: | ||
tshwctl -a 0x8 --poke32 0x400 | tshwctl -a 0x8 --poke32 0x400 | ||
</source> | </source> | ||
{{Note|Pin# 10 is an input only pin, even when it is set to GPIO with the command above.}} | |||
The DIO header is designed to provide compatibility with the KPAD accessory. This is a 4x4 numerical keypad. This is supported in userspace with the [https://github.com/embeddedTS/ts7100-utils/blob/master/src/keypad.c keypad.c] source code, or the "keypad" utility which is included in the shiping image. | The DIO header is designed to provide compatibility with the KPAD accessory. This is a 4x4 numerical keypad. This is supported in userspace with the [https://github.com/embeddedTS/ts7100-utils/blob/master/src/keypad.c keypad.c] source code, or the "keypad" utility which is included in the shiping image. |
Revision as of 16:11, 10 May 2023
The DIO header is a 0.1" pitch 2x8 header including SPI and GPIO. All pins on this header are 5V tolerant except SPI output pins. All of these DIO includes pullups.
Signals | Pin Layout | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
To use the SPI pins on this header as GPIO instead, disable SPI by changing the FPGA Syscon 0x08 bit 10:
tshwctl -a 0x8 --poke32 0x400
Note: | Pin# 10 is an input only pin, even when it is set to GPIO with the command above. |
The DIO header is designed to provide compatibility with the KPAD accessory. This is a 4x4 numerical keypad. This is supported in userspace with the keypad.c source code, or the "keypad" utility which is included in the shiping image.
This debounces presses to 50ms, and does not repeat when numbers are held. This will output a string containing the key that is pressed. Eg:
root@tsimx6:~# keypad 1 UP DOWN 2ND ENTER