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.

TCA6408 failure to read Input port.

Other Parts Discussed in Thread: TCA6408

i am using a NXP LPC1768 to communicate with a TCA6408.  I am using the I2C0 interrupt on the LPC1768. The I2C routines

are a slight modification of a NXP sample.

I can write to the TCA6408 with absolutely no problems,  Whenever I try to read the Input Port the response is always the

LAST write to the Output Port, not what is actually on the 8 data lines.  I have  configured the chip to have P7-P4 to

be inputs and P3-P0 to be outputs.  I then write 0x0E to the Output Register.  The data pins the read 0xFE.

I read the Input Port and it returns 0xFE.  I then tie P7 to GND.  The Input port Still read 0xFE, not 0x7E

as I  am expecting.

 

Is there extra delays needed when going from Master Transmit Mode to Master Receive Mode. I am Lost.

Any suggestions would be greatly appreciated.

 

  • I found my Problem RE: the TCA6408.  I was using the CODE RED Red Suite 3 for the LPC1768 and the canned I2C.  I was using a CHAR array  to set up the I2C command and data stream. The 0x00 command to read the Input Port would merge with the 0x41 Read command so my resulting stream  was 0x40,0x41,0xXX instead of 0x40,0x00,0x41. The result was that the TCA6408 always returned the WRITE Reg.(which was just pre-loaded)

    The correction was to make the Command Array 32 bit integers to match the I2C Regs in the LPC1768.   

  • Hello,

    Thank you for providing this information.

    Best,
    Michael