This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA8418 application issues

Other Parts Discussed in Thread: TCA8418, TPD8E003, TPD6F002, TCA8418E

Basically the problem is “When we press any key on Row 0, we get two key events instead of one.  Rows 1, 2 and 3 all work properly and as expected.” In other words it seems that two keys were pressed, ONLY at Row 0. Here is the details. Please help me out.

Terms Used:

When referring to Key numbers such as Key 1, or Key 12 we are referring to raw key codes as described in “Table 6. Key Value Assignment” in the TCA8418 Datasheet, “SCPS215B - September 2009 - Revised March 2010”.

 

Problem Overview:

When we press any key on Row 0, we get two key events instead of one.  Rows 1, 2 and 3 all work properly and as expected.

 

Press Key 1: We get Key Events, Key 1 Press and Key 2 Press.

Press Key 2: We get Key Events, Key 2 Press and Key 3 Press.

Press Key 3: We get Key Events, Key 3 Press.

 

Release Events have the same behavior as the Press Events except normally the keys are reversed in that instead of getting Key 1 Press then Key 2 Press, we get Key 2 Released, Key 1 Released.

 

We have also found that if we change the configuration to be a 4x4 keypad then we get duplicates on Key 3 as well, or if we change to a 2x2 keypad then we do not get duplicates on Key 2.  So basically, we never get duplicates on the key that corresponds to the highest numbered Column that is configured.

 

Our Keypads:

We have two keypads, one hard and one tactile (buttons click) that are both 4 row, 3 column keypads.  Both keypads have the exact same behavior.  The only difference layout wise between the keypads is Column 0 starts on the right for one keypad, and starts on the left for the other.

 

Hardware Design:

ROW0 – ROW3 are connected from the TCA8418 to the keypads along with COL0-COL2.  There are no pull-ups, pull-downs or capacitors between the TCA8418 and the keypad.  We are relying on the 100K 3.3V pull-up in the TCA8418 on the ROWs to help drive the logic high in the Open Drain Circuit.

 

Actual Configuration:

To setup the TCA8418 we write the following raw data to it (Address = Data).  We basically want to use a 4(rows)x3(cols) Matrix Keypad that generates interrupts on key events.  This is in the format Write [REGISTER]  = [VALUE].

 

Write 0x01 = 0x69

Write 0x1A = 0x00

Write 0x1B = 0x00

Write 0x1C = 0x00

Write 0x1D = 0x03

Write 0x29 = 0x00

Write 0x2C = 0x00

Write 0x1E = 0x03

Write 0x2A = 0x00

Write 0x2D = 0x00

Write 0x1F = 0x00

Write 0x2B = 0x00

Write 0x2E = 0x00

Write 0x03 = 0x00

Write 0x02 = 0x1F

 

We originally only set the pull-up and de-bounce configuration for the Rows and Columns that we actually use, but also tried disabling all pull-ups, enabling all pull-ups, disabling all de-bouncing and enabling all de-bouncing.  Currently all de-bouncing and pull-ups are enabled.

 

During Interrupt (Duplicate Keys):

This shows the registers that we read from and write to (and their contents) when get an Interrupt in the case of Duplicate Keys.  For this, we’ve configured the keypad as 2x2.

 

Read Register 0x02: Contents: 0x01

Read Register 0x03: Contents: 0x02

Read Register 0x04: Contents: 0x81

Read Register 0x04: Contents: 0x82

Write Register 0x02: Contents: 0x01

 

During Interrupt (Correct Keys):

This shows the registers that we read from and write to (and their contents) when get an Interrupt in the case of Duplicate Keys.  For this, we’ve configured the keypad as 2x2.

 

Read Register 0x02: Contents: 0x01

Read Register 0x03: Contents: 0x01

Read Register 0x04: Contents: 0x82

Write Register 0x02: Contents: 0x01

 

Test 1, Bypassing Keypads and using Wires Directly:

We directly shorted ROW0 and COL1 using a jumper to remove our Keypads from the equation, and still find the same result as when we use the Keypad.

 

Test 2, Configuring System for 2x1 Keypad:

We also configured the system to work with a 2 Column 1 Row Keypad and got identical results.

 

Test 3, Leaving COL0 and ROW0 Connected:

If we do this, the first time that we connect them we get the Key 1 Pressed, Key 2 Pressed as we have seen earlier.  However at intervals between 1 second and 15 seconds we get additional events for Key Press 2 / Key Release 2.  We have not tested to see if this occurs by holding the key down on our keypad yet.

 

For Example We Get The Following Events:

Key Press 1

Key Press 2

Key Press 2

Key Release 2

Key Press 2

Key Release 2

 

We do not think that this is some sort of un-documented key-repeat feature as well as the repeat rate is not constant as it varies between 1 second and 15 seconds.  As soon as the repeat starts, we only get the single Key event as we expect, however it is for Key 2 instead of Key 1.

  • I've seen previous cases where capacitance on the line has caused a double key read like you describe.

    A 100kOhm pull-up resistor added beween the row and VCC would solve this problem.  I am not sure why you are seeing the behavior regardless of configuration, I will look into this.

     

     

  • Thanks Hattie. Please let me know what you can find out. Customer is going to check the design.

    Best...

  • Hello

    • Doesn't TCA8418 automatically add internal pull ups at all the rows?
    • Do I also need to add external pull down at all columns?

     

    Thanks

    Kaveh

  • Hi Kaveh,

    Yes, the TCA8418 automatically adds internal pull-ups, but sometimes a stronger pull-up is needed. Adding this additional 100kOhm will strengthen the pull-up.

    No, you do not need to add an external pull-down on the columns.

     

  • Hi Hattie

    Thanks for your reply. aside from adding these pull ups is there anything suspicious in our code that you we should consider correcting it, would you also like to see portion of our  SW code that handles TCA8418?

    once again thanks for your help and consideration.

     

    Regards,

    Kaveh

  • Hi Hattie

    Thanks for your help, after adding external pull up(10K) to all rows it is now working properly.

    one more question,

    Can we change the keypad scanner confguration in such a way that its internal pull up are on Coulmns and internall pull down on Rows?

    Regards,

    Kaveh

     

  • No, the TCA8418 keyscan mode cannot be configured this way.

    The Rows are inputs that register LOWs as key presses. These LOWs are generated by the columns, which are configured as open drain outputs. If there are pull-downs on the rows then the inputs will always be low and the device will not correctly register keypresses. 

  • Thanks Hattie.

     

    everything is working fine now.

    regards,

    kaveh

     

  • Hello

    Regarding the TCA8418, it now seems functioning properly however I've noticed that voltage at most of the Rows or colomns varies between 1.4V to 2.2V. IC is connected to 3.3V.

    during our ESD testing at 12kv air discharge (when the physical keypad was zapped), we've observed that some of the rows and columns could get stuck at 2.2V and the chip is no longer working.

    Questions:

    1. Do the voltages at rows and columns correct? shouldn't they all be at 3.3V?
    2. What do you recommend for ESD protection.

    Regards,

    Kaveh

     

  • Could someone please respond to this post.

    Here are some options for ESD

    TPD8E003: 8-Channel ESD Array For Portable Space-Saving Applications
    Product Folder: http://focus.ti.com/docs/prod/folders/print/tpd8e003.html
    Datasheet (PDF): http://focus.ti.com/lit/ds/sllse38a/sllse38a.pdf

    TPD6F002: 6-Channel EMI Filter for Display Interface
    Product Folder: http://focus.ti.com/docs/prod/folders/print/tpd6f002.html
    Datasheet (PDF): http://focus.ti.com/lit/ds/slls876a/slls876a.pdf

     

  • Hello Kaveh,

    I cannot tell from your message in what state the ROWx / COLx pins are programmed to be.

    Upon a power-up condition or after a device reset, all the I/Os are programmed as inputs with either 50K or 100K (depending of the device revision you are looking at) pullup resistors enabled. Thus, with no external load, all pins should pull to Vcc.

    If the device is programmed so the pullups are disabled, yet the pins remain programmed as inputs, they will be high-impedance, so they may drift to some voltage between GND and Vcc.

    For I/Os programmed to key scan mode, with the key-scan logic in the idle state, the Rows have the pullups always enabled, so they should pull to Vcc. The Columns are driven to GND. The key-scan logic is in the idle state when no keys are pressed and the Key Event registers are all empty.

    When the device is connected to a key matrix, the key-scan logic enters the active state once any key is pressed and remains active until all keys are released and all key press or release data are retrieved from the Key Event registers. While active, with no keys pressed, the Rows should remain pulled to Vcc and the Columns should alternate between being pulled to GND and high-impedance (discharged to GND) within the scan cycle of approx 25mS.

    While active, with one or more keys pressed, the Rows connected to the pressed keys will alternate between Vcc and GND over the 25mS scan cycle. The remaining Rows should stay at Vcc. The Columns connected to the pressed keys should also alternate between Vcc and GND over the scan cycle. The remaining Columns should stay at GND.

    If you are reading voltages on Rows or Columns connected to pressed keys, with an oscilloscope, you should see waveforms with alternating low and high periods over the 25mS scan cycle. If, however, you are reading the voltage of these pins with a DVM, the averaging feature of the meter will indicate some voltage between zero and Vcc.

    Apart from these scenarios, there should be no case where the I/Os of a properly operating device with no external load or drive should indicate any level other than Vcc or 0V.

    Let me know if you wish to provide more details of device application of you have further questions.

    Regards,

    Ken Williams

    Texas Instruments

  • Hi Ken Thanks for all the valuable information you've provided to us.in our system the keypad scanner is configured to be in scan mode and it is also tied to 3.3V. What we've found so far is that for some unknown reasons and in the middle of operation, keypad scanner hangs (becomes non responsive) and at this time voltages at rows or columns could vary from 0V to 1.2V , 1.6V or 3.3V. In normal operation these voltages are either 3.3V or 0V as you indicated in your reply. As an additional note TCA8418 is connected to our physical 38 keypad via a 46 inches long cable. There is no buffer between the keypad scanner and this long cable and I am not sure whether the length of cable could cause the TCA8418 to not operate properly. Besides we are using TCA8418RTWRthe which unlike TCA8418E is not internally protected against ESD (human body). I was wondering if you can please share your comments on what could possibly cause the TCA to hang and what we can do to improve the situation both in SW and HW. your support ion this matter is greatly appreciated as our field trial is in next month and this issue can completely stops our field trial and our production in June. Best Regards, Kaveh Fard Sr. HW Engineer
  • Kaveh,

    There may be excessive capacitance on the row / column lines.

    Does the device function properly before entering the non-responsive mode? That is, are you able to read key press / release events?

    When in this mode, does the device become warm to the touch? Is it possible to measure the Icc value?

    When it enters this mode, does it recover and function properly after power is removed and restored?

     

    Regards,

    Ken Williams

    Texas Instruments

  • Ken

    Does the device function properly before entering the non-responsive mode?  (answer)YES

    When in this mode, does the device become warm to the touch? No

    Is it possible to measure the Icc value? I'll try, it won't be that easy due to layout.

    When it enters this mode, does it recover and function properly after power is removed and restored?It can be recovered either by recycling the power and reconfiguring the IC or resetting the IC and reconfiguring it again. It seems that device configuration is being changed for some reasons.

     

    As I indicated before the TCA8418 needs to drive a long cable of 46 inches. Could this be the root cause? Do I need to use a buffer between the TCA8418 GPIO lines and the cable?

    Regards,

    Kaveh

  • Hi, I also had same issue in my design. Using 10K pull-up solved the issue.

    My question is that is this issue with ROW0 only or it the most vulnerable ROW? I also had problem only on ROW0, other rows are OK. In other words, would it be safe to use extra pullup only for ROW0 or should I use pullup for all ROWs?

    Thank you

  • My keyboard hangs in between long multiple pressess, I have tried to pull up rows with 100k but still the problem exists.

    INT is permanently low when this problem comes and the processor not able to reenable the interrupt.

    thanks