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 interface to microcontroller

Other Parts Discussed in Thread: TCA8418

Hello Dear

 

I want to interface TCA8418 keypad scan ic with microcontroller.

will any body suggest me the initialization of tca8418 for interfacing , or any sample code to refer .

 

 

 

 

thanks

 

 

  • How you configure the chip will vary according to how your particular design needs to use it, none of which you gave any details on.

    I would suggest starting by hooking it up to the microcontroller (whichever one that is...) and getting an I2C driver operating and verify you cna read and write the registers.

    Then you need to determine what register settings you need for your particular setup.

  • thanks for reply

     

    I am trying to use this IC for my keypad matrix scan so that when I press any key it will give interrupt on the INT pin,

    but the interrupt is not coming when I press any switch or change logic on row or column.

    interrupt always remains on low. then I pull up that with 100 k to VCC ,now it is on high level .

    but it doesn't change logic on key press.

    for that I want to know is there any initialization sequence.

     

     

    regards

     

     

    is there any update from any body

     

  • I am trying to write and read the registers of tca 8418 ,

    as I have written 0x01 in the 0x01 register but when I read this it always showing 0xff,

     

    can anybody help me to in interfacing tca8418

     

    thanks

  • no reply from anybody

  • harnek singh said:

    as I have written 0x01 in the 0x01 register but when I read this it always showing 0xff,

    Have you looked at the physical transaction? I.E. put a scope probe on the I2C lines and capture the data going across. This will narrow down where the problem is. For instance, does the micro send out the correct command/data to the TCA8418? Does the TCA8418 respond appropriately? Do you have the proper pullup resistors on the I2C line?

    Hopefully you will find your problem when you answer these questions...

  • Hi Harnek,

    What Brian suggested is going to be the best way to determine why you are reading back 0xFF from register 0x01. This register will start up as 0x00 and you should not be seeing 0xFF while reading.

    To configure the TCA8418 for use in a keypad application this would be the minimum configuration required if you are using all 80 keys.

    Write 0x01 to Register 0x01 (To enable Key event interrupt)

    Write 0xFF to Register 0x1D (Next three commands set all rows and colums to be part of the keypad matrix)
    Write 0xFF to Register 0x1E
    Write 0x03 to Register 0x1F 

    On any key press or release an interrupt will be triggered. Once an interrupt is detected you will want to follow the steps below

    The least significant bits of register 0x03 are the number of key events that are stored in the FIFO. First read register 0x03 to determine if there are events in the FIFO. If there are, read register 0x04 to determine what key event happened. After reading register 0x04, read register 0x03 again. Then repeat these steps until the least significant bits of register 0x03 are zero.

    Write 0x01 to Register 0x02 to clear the Key event interrupt.

    Regards,
    Chris Kraft 

  • hi chris , i am nics jasani

    i also use TCA8418 and trying to interfacing with PIC16F887. But i dont know how to read FIFO resister of Pressing or Releasing Keys , So can you help me on it.???

    Regards,

    Nics jasani

  • hey nobody for help..!!!!! :(

  • Hello Nirav,

    Please see page 17 of the datasheet for information regarding the FIFO register and its intended implementation. http://www.ti.com/lit/ds/symlink/tca8418.pdf

    Regards,

    Andrew