Difference between revisions of "TTP229-B"
Grovkillen (talk | contribs) |
Grovkillen (talk | contribs) |
||
(23 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | = Introduction = | |
+ | The TTP229-B is a chip used for touch pads. Typically the TTP229-B is used with 8 or 16 keys. Power requirements are 2.4V - 5.5V which makes them ideal to use with ESP Easy, the communication protocol is a proprietary serial variant but essentially only 4 cables (2 power, 2 communication) are needed for up to 16 keys. Please observe that the sibling module '''TTP229 is using I2C''' and thus not supported by ESP Easy! | ||
− | + | [[File:TTP229 1.jpg|420px]] | |
− | |||
= Hardware = | = Hardware = | ||
− | + | ||
− | + | '''ESP''' '''Keypad''' | |
− | + | GPIO <--> SCL | |
− | + | GPIO <--> SD0 | |
+ | |||
+ | '''Power''' | ||
+ | 3.3V <--> VCC | ||
+ | GND <--> GND | ||
+ | |||
+ | <span style="color:red">Please observe that you should NOT use default I2C pins since this will jam the I2C communication with the other I2C devices.</span> This is because of the proprietary serial protocol, with clock (SCL) and bidirectional data (SDO), used by this module. | ||
+ | |||
+ | |||
+ | == 8 keys vs 16 keys == | ||
+ | In order to get the 9-16 keys to work you need to bridge the P1.3 pair (see picture below). The setting will come active on boot of the module. Other settings is also possible but not covered in this guide. | ||
+ | |||
+ | [[File:TTP229 2.jpg|420px]] | ||
+ | |||
+ | [[File:TTP229 3.jpg|420px]] | ||
= ESP Easy = | = ESP Easy = | ||
Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Keypad - ..." from the drop down box. | Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Keypad - ..." from the drop down box. | ||
− | [[File:TTP229 screendump.PNG]] | + | [[File:TTP229 screendump.PNG|520px]] |
+ | |||
+ | If you check "ScanCode" the key number will be reported and not the exponential numbering which is generally used when the module is set to allow multiple inputs simultaneously (if you use multi input the value will be the sum of all the pressed keys). | ||
The values that this device reports will be as follows: | The values that this device reports will be as follows: | ||
− | |||
− | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
− | ! | + | ! Key (ScanCode) |
− | ! Value | + | ! Value (8 key) |
+ | ! Value (16 key) | ||
! Extra information | ! Extra information | ||
|- | |- | ||
Line 27: | Line 42: | ||
| 1 | | 1 | ||
| 257 | | 257 | ||
− | | | + | | 1 |
+ | | | ||
|- | |- | ||
| 2 | | 2 | ||
| 514 | | 514 | ||
+ | | 2 | ||
+ | | | ||
|- | |- | ||
| 3 | | 3 | ||
| 1028 | | 1028 | ||
+ | | 4 | ||
+ | | | ||
|- | |- | ||
| 4 | | 4 | ||
| 2056 | | 2056 | ||
+ | | 8 | ||
+ | | | ||
|- | |- | ||
| 5 | | 5 | ||
| 4112 | | 4112 | ||
+ | | 16 | ||
+ | | | ||
|- | |- | ||
| 6 | | 6 | ||
| 8224 | | 8224 | ||
+ | | 32 | ||
+ | | | ||
|- | |- | ||
| 7 | | 7 | ||
| 16448 | | 16448 | ||
+ | | 64 | ||
+ | | | ||
|- | |- | ||
| 8 | | 8 | ||
| 32896 | | 32896 | ||
+ | | 128 | ||
+ | | | ||
|- | |- | ||
| 9 | | 9 | ||
− | | | + | | - |
+ | | 256 | ||
+ | | | ||
|- | |- | ||
| 10 | | 10 | ||
− | | | + | | - |
+ | | 512 | ||
+ | | | ||
|- | |- | ||
| 11 | | 11 | ||
− | | | + | | - |
+ | | 1024 | ||
+ | | | ||
|- | |- | ||
| 12 | | 12 | ||
− | | | + | | - |
+ | | 2048 | ||
+ | | | ||
|- | |- | ||
| 13 | | 13 | ||
− | | | + | | - |
+ | | 4096 | ||
+ | | | ||
|- | |- | ||
| 14 | | 14 | ||
− | | | + | | - |
+ | | 8192 | ||
+ | | | ||
|- | |- | ||
| 15 | | 15 | ||
− | | | + | | - |
+ | | 16384 | ||
+ | | | ||
|- | |- | ||
| 16 | | 16 | ||
− | | | + | | - |
+ | | 32768 | ||
+ | | | ||
|- | |- | ||
|} | |} |
Latest revision as of 17:05, 22 July 2017
Introduction
The TTP229-B is a chip used for touch pads. Typically the TTP229-B is used with 8 or 16 keys. Power requirements are 2.4V - 5.5V which makes them ideal to use with ESP Easy, the communication protocol is a proprietary serial variant but essentially only 4 cables (2 power, 2 communication) are needed for up to 16 keys. Please observe that the sibling module TTP229 is using I2C and thus not supported by ESP Easy!
Hardware
ESP Keypad GPIO <--> SCL GPIO <--> SD0 Power 3.3V <--> VCC GND <--> GND
Please observe that you should NOT use default I2C pins since this will jam the I2C communication with the other I2C devices. This is because of the proprietary serial protocol, with clock (SCL) and bidirectional data (SDO), used by this module.
8 keys vs 16 keys
In order to get the 9-16 keys to work you need to bridge the P1.3 pair (see picture below). The setting will come active on boot of the module. Other settings is also possible but not covered in this guide.
ESP Easy
Use the device tab on the ESP Easy web interface and create a new task by editing one of the available tasks. Select "Keypad - ..." from the drop down box.
If you check "ScanCode" the key number will be reported and not the exponential numbering which is generally used when the module is set to allow multiple inputs simultaneously (if you use multi input the value will be the sum of all the pressed keys).
The values that this device reports will be as follows:
Key (ScanCode) | Value (8 key) | Value (16 key) | Extra information |
---|---|---|---|
1 | 257 | 1 | |
2 | 514 | 2 | |
3 | 1028 | 4 | |
4 | 2056 | 8 | |
5 | 4112 | 16 | |
6 | 8224 | 32 | |
7 | 16448 | 64 | |
8 | 32896 | 128 | |
9 | - | 256 | |
10 | - | 512 | |
11 | - | 1024 | |
12 | - | 2048 | |
13 | - | 4096 | |
14 | - | 8192 | |
15 | - | 16384 | |
16 | - | 32768 |