I2C - PCA9555 and PCA9554

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C - PCA9555 and PCA9554

1,848 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Aug 21 10:20:07 MST 2012
I'm interfacing the PCA9555 and PCA9554 to my LPC1788 using the P82B96 drivers, and came across an interesting situation.  Perhaps there are others out there doing the same thing?

The interface looks like this (that's an RJ45 Ethernet connector on the right)

So, for diagnostic purposes, I connected all 8 pins on the PCA9554 to the lower 8 bits of the PCA9555, and wrote a test loop that sends test bytes out to the PCA9554, then reads them back from the PCA9555 (ignoring the upper 8 bits).
Labels (1)
0 Kudos
4 Replies

1,693 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Sat Sep 01 18:47:56 MST 2012
Okay, nevermind... duh...

My bus signals were screwed up because I had 3 of those P82B96's connected to the same bus...  can't do that...
The logic analyzer was doing its best to interpret the screwed up signals, and waddya know - it put extra bytes up for me to be confused by  :-)

When I used the scope, the problem was obvious.  I removed all but one driver, and the signals were fine, and the analyzer reflected the right sequence...

Dontchya just love scopes?

Anyway, thanks to everyone who was "thinking" about responding to this thread...
0 Kudos

1,693 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Aug 21 10:39:07 MST 2012
By the way, I'm using the CMSIS interface to talk to these devices...

<code>

I2C_MasterTransferData((en_I2C_unitId)I2C_CHANNEL, &transferMCfg, I2C_TRANSFER_POLLING);

</code>

So my question is:  What's going on here?

Anybody else see this extra stuff at the end of the communication list?

0 Kudos

1,693 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Aug 21 10:31:43 MST 2012
When you blow this up, you see the following sequence:

Write Address 20h => Address of PCA9554 (0x40>>1), <A=Acknowledge>
Command  01h => Command byte WRITE, <A=Acknowledge>
Value 77h =>Value to data to port, <A=Acknowledge>, <P=Stop>

Write Address 26h => Address of PCA9555 (0x4C>>1), <A=Acknowledge>
Command  00h => Command byte INPUT PORT 0 SELECT, <A=Acknowledge>, <P=Stop>

Read Address 26h => Address of PCA9555 (0x4C>>1), <A=Acknowledge>
Lower Byte Value 77h => read lower order byte, auto increment next read to higher order byte, <A=Acknowledge>
Higher Byte Value FFh => read higher order byte, auto decrement next read to lower order byte, <N=No-acknowledge>


NOT SURE WHERE THE 7Fh AND < A > ARE FROM, OR WHY THEY ARE THERE???
0 Kudos

1,693 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Tue Aug 21 10:26:23 MST 2012
Here is a typical exchange over the I2C bus between both parts:
0 Kudos