TCA8418 I2C Controlled Keypad 'cross-talk' intermittent problem
Part Number: TCA8418
I'm having a problem when I press more than one key at a time. Pressing any 1 key is detected perfectly, always. If I press 2, or 3, or more keys, if they all occur at the same time (as close as my hands are pressing them concurrently) sometimes 1 or more won't register going down. The same is true when I release the keys as well.
While my matrix does have 1n4148 diodes, I am able to reduce my design to just enabling 3 keys to even see this behavior, they have taken over completely column 4, 5 and 6.So to be sure, and disable all the other row/column, I put this:
writeI2C8(FD_PANEL,0x1D,0x00); //SET ROWS PART OF KEYSCAN (R0-R4) writeI2C8(FD_PANEL,0x1E,0x00); //SET ROWS PART OF KEYSCAN (C0-C3, C7) writeI2C8(FD_PANEL,0x1F,0x00); //SET ROWS PART OF KEYSCAN (C8-C9) writeI2C8(FD_PANEL,0x20,0x00); // ROW5 GPIO INTO FIFO
writeI2C8(FD_PANEL,0x21,0x70); // COL456 GPIO INTO FIFO
I've scoped the signals on 4 5 and 6 and they look fantastic. Not seeing any capacitance droop or excessive ringing.The only thing I know that is not 100% correct is ROW 6 and 7 are floating because they are not being used in any configuration. But given the rows are open anyways if no button is down, I didn't think that would cause any problems.I'm just not sure what else to check. I have 2 boards built up and both behave exactly the same.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Richard Burnett:
In reply to TRX Bobby:
This was all done with momentary press chips in circuit. I've attached the circuit as laid out on the PCB. SDA/SCL coming from an ARM processor. 100nF between power and ground. 10k pull-up on reset and INT.That said, to reduce the complexity to a more simple problem, I just set up the TCA8418 to just listen to the columns with the switches labelled G1, G2 and G3. This way, only those three were being watched and only those three were told to insert their values into the key buffer.Key presses were done by hand. So if I push down (and held) 2 buttons at the same time, in some cases, one of them would not be detected.If I then waited any amount of time then released both at the exact same time, many times one of them will not get detected as leaving the engaged state. It's as if when they both happen at the same time, it cannot see one of them in some cases.If the circuit is just watching for changes on those columns assigned to G1, G2 and G3, I am unclear how it could not see the changes.(row 5 goes off to another grounded switch and is used as a GPIO, but in the simple case, I ignored it and just used the 3 columns)
Hey Richard, Just to confirm, are you using this device in keypad mode when you are using just the columns? Thanks, -Bobby
EDIT: meaning did you configure the column3-5 to be GPIOs or part of the KP matrix. register 0x1E (KP_GPIO2)
From your first post it seems the device thinks that column 3-5 are part of the keypad matrix because you have them set as KP with your 0x00h.
Yep, that's what happens when I press 2 keys at the same time, but not every time, it's intermittent (or likely I am not hitting them at exactly the same time every time since I am just pushing with two fingers).
If I press each of the buttons by themselves and release, I see in 0x04 both down and up as I read them out. If I even do say A down B down A up B up slowly I see them all. If I do just A as fast as I can possibly hit the button, I never miss a down and up sequence from the FIFO.However, if I press them down at the same time (as exact as I can) and I look what comes out of the FIFO, I get one of them down and not the other. Not ever time, let's say like 50% of the time it misses one.I keep pulling from the FIFO until it returns 0.I even just kept pulling from the FIFO and just printing out when it was not zero, just to see if it was in there, but somehow was after a zero returned.It's like somehow, when I hit both buttons at the same time, one is masking the other. (Let's forget about keyscan mode for now and just focus on those 3 as GPIO that I told it record their changes in the FIFO).When I hooked up a scope to the switching to see what the bounce looked like, very clean edges. Just doesn't seem like a lot of other settings to try changing.Rick
I ordered some EVMs for this device to be shipped to me. I will try to see if I can reproduce what you are seeing as well.
I do have quite a bit to do this week so I may not be able to get the EVM set up immediately when it does arrive but I will try (likely this Friday).
One thing you can try doing is adding an external pull up resistor on your columns (about 10k or so) to Vcc and repeating your multi button press test. Let me know if adding the resistors changes the results.
For columns C4, C5 and C6 I tied a 12k (all I had) resistor to VCC (3.3V) and then reran the test on just those 3 buttons (each column had it's own 12k tied to VCC). No change in performance. Pressing multiple buttons still ends up causing events to be missed in the FIFO.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.