I could not find the arduino library code for TTP229 keys and hoping this will help others who have bought this item from ebay to be able to use the keyboard.
The pin layout is clear enough that only 8 buttons were mapped to direct pin mapping. In order to use full 16 buttons, direct pin mapping is definitely not the way to go. So the serial clock and data line has to be used.
Finding the proper datasheet was a major problem. First I got reference to two conflicting documents, one located here and another here.
The first datasheet had a pin layout for TTP229 as 28 pins which matched with the hardware chip. But second link had a pin layout of TTP229 containing 48pins which did not match what was in hardware. So obvious choice to follow in the datasheet seemed to be the first link which is from datasheet4u. The document mentions that keyboard supports I2C and was happy to hear it. I put that under the buspirate and nothing was detected. After checking all connection, it did not seem to be supporting any i2c protocol and the initial excitement was subdued. Then I decided to see the waveform for serial clock. It was outputting the data as expected as per specification two here. So even though the pin diagram of TTP229 (48pin) does not match the actual hardware pin (28pins), decided to follow it to see what happens.
From the captured waveform subdued the moment I realized that button is outputting 0 for the button number that is pressed as well as for button number+8. So the waveform contained two 0s for even a single key being pressed. After a bit of reading the default configuration as per the spec is, TTP229 works in 8 key mode. In order to make it work in 16 key mode, one has to connect TP2 to ground through a high value resistor. Then referring to the schematic diagram, it is easy to find there is a handy high value resistor (1M) connected to header next to each of the buttons. By manually verifying the wire trace matching with the schematic diagram, decided to connect TP2 to Gnd.
Initially I was skeptical manufacturer will send a 16key keyboard configured to work as 8key keyboard. But after convincing myself that I have done enough reading, and a good enough dose of get it to work or burn it, I added a trace connecting pins (highlighted in Yellow) as shown in the picture.
I could not find the arduino library code for TTP229 keys and hoping this will help others who have bought this item from ebay to be able to use the keyboard.The pin layout is clear enough that only 8 buttons were mapped to direct pin mapping. In order to use full 16 buttons, direct pin mapping is definitely not the way to go. So the serial clock and data line has to be used. Finding the proper datasheet was a major problem. First I got reference to two conflicting documents, one located here and another here.The first datasheet had a pin layout for TTP229 as 28 pins which matched with the hardware chip. But second link had a pin layout of TTP229 containing 48pins which did not match what was in hardware. So obvious choice to follow in the datasheet seemed to be the first link which is from datasheet4u. The document mentions that keyboard supports I2C and was happy to hear it. I put that under the buspirate and nothing was detected. After checking all connection, it did not seem to be supporting any i2c protocol and the initial excitement was subdued. Then I decided to see the waveform for serial clock. It was outputting the data as expected as per specification two here. So even though the pin diagram of TTP229 (48pin) does not match the actual hardware pin (28pins), decided to follow it to see what happens.From the captured waveform subdued the moment I realized that button is outputting 0 for the button number that is pressed as well as for button number+8. So the waveform contained two 0s for even a single key being pressed. After a bit of reading the default configuration as per the spec is, TTP229 works in 8 key mode. In order to make it work in 16 key mode, one has to connect TP2 to ground through a high value resistor. Then referring to the schematic diagram, it is easy to find there is a handy high value resistor (1M) connected to header next to each of the buttons. By manually verifying the wire trace matching with the schematic diagram, decided to connect TP2 to Gnd.
Initially I was skeptical manufacturer will send a 16key keyboard configured to work as 8key keyboard. But after convincing myself that I have done enough reading, and a good enough dose of get it to work or burn it, I added a trace connecting pins (highlighted in Yellow) as shown in the picture.
การแปล กรุณารอสักครู่..