PCAL6416APW not getting detected on i2c bus

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

PCAL6416APW not getting detected on i2c bus

963 Views
macjanfernandes
Contributor II

Hello NXP community,

 

I'm facing a weird issue of device not getting detected on i2c bus.

 

Connection on bus is as follows:

Master: MCU (DSPIC33EP)

Slave: 24LC32A, PCAL6416APW(ADDR 0), PCAL6416APW (ADDR 1)

Currently on PCB:

PCAL6416APW(ADDR 0) i2c bus for this slave has been removed. (jumpers) so only 2 devices are present digital output and eeprom.

When I try to write something on io expander, i always get NACK. Please let me know what is wrong here.

Attaching schematic and Logic analyser plot below:

Input schematic:

macjanfernandes_1-1683800923277.png

output schematic: (please note the ADDR pin is now connected to +5V as mentioned in datasheet pg6)

macjanfernandes_0-1683800884016.png

 

logic analyser write to output (Address 1).:

macjanfernandes_2-1683801075206.png

 

Please let me know what is going on here and what I can do to make it work.

Regards,

 

Macjan

 

0 Kudos
9 Replies

948 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Macjan,

please confirm if you have used pull-up resistors for the SDA and SCL lines to the VDD(I2C) voltage source. Please refer to the Figure 17. in the PCAL6416A datasheet.

JozefKozon_1-1683806210450.png


If you have used the pull-up resistors, please state the value and approximate length of the SDA and SCL PCB traces and/or Cables. 
If you haven't used the pull-up resistors, please test to use 2kOhm, also please state the value and approximate length of the SDA and SCL PCB traces and/or Cables. 

With Best Regards,

Jozef

0 Kudos

943 Views
macjanfernandes
Contributor II
I believe its < 5cms. All 3 are closeby to MCU.
0 Kudos

944 Views
macjanfernandes
Contributor II

Jozef,

Thank you.

 

Yes there is a 2.2k Pull up on SCL and SDA line. 

macjanfernandes_0-1683810633437.png

 

Regards,

 

Macjan

0 Kudos

923 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Macjan,

thank you for the additional information. According to your description, everything should work correctly. Please try following. 

1. Please disconnect the EEPROM 24LC32A, and leave only the MCU master and the PCAL6416APW (ADDR 1) slave, with the pull-up resistors. 

2. Please connect the !INT pin though a 2k2 pull-up resistor to VDD_I2C pin. To the 3.3V source. 

JozefKozon_0-1683877467709.png

JozefKozon_1-1683877491001.png 

Although the !INT is an output, and it shouldn't be a problem, to leave it floating, there is nothing in the datasheet, how it should be connected when unused. Therefore, please connect it as described in the Table 3. 

3. Please power on the devices and please try to engage communication between the MCU and the PCAL6416APW (ADDR 1). If you will still receive the NACK from the slave, please do PCAL6416A POR according to the Figure 22. in the section 9.3 in the PCAL6416A datasheet and please try to engage the communication again.

JozefKozon_2-1683877946390.png

With Best Regards,

Jozef

 

 

 

0 Kudos

893 Views
macjanfernandes
Contributor II

Hello Josef,

 

I have removed 20E connected on 24LC32A. Now only one IC is connected to microcontroller on i2c BUS.

This is below waveform:

Observation: The device still does not respond. I'm sending u voltages on each pin for the same in next image.

macjanfernandes_0-1684145218203.png

voltages.png

As per description in datasheet, its mentioned that Voltage on Reset when  not used connect to i2c bus voltage (3.3V in this case).

INT is not connected.

ADDR + VDD(P)  are connected to 5V

I2C SDA, SCL, RESET, VDD_I2c are connected to 3.3V

20E on i2c bus are removed for EEPROM + IO Expander (PCAL6416)

Only one i2c device is connected at address 0x21

If any thing I need to try pls do let me know.

0 Kudos

880 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Macjan,

please connect the !INT pin through a 10k pull-up resistor to the VDD(I2C-bus) pin. Increase the SCL and SDA pull-up resistors to 5k. Please confirm, that you have purchased the PCAL6416APW from one of our authorized distributors. See this link for a list of our authorized distributors. If this does not help, please replace the PCAL6416APW with a new one. Let me know, if it worked.

With Best Regards,

Jozef

0 Kudos

874 Views
macjanfernandes
Contributor II

Hello Jozef,

We purchased this item from digikey.in

We had replaced it once. There was no response.

I'll try 10k pull up on INT and 5.1k pullup as we have this in stock, will get back to you.

 

Regards,

Macjan

0 Kudos

863 Views
macjanfernandes
Contributor II

Hello Josef,

The chip started responding to the commands.

 

There was no issue with wiring. Problem was that the chip i2c bus was in bit banging mode and this state below caused the address to change to 0x31 instead of 0x21. Please check below:

 

macjanfernandes_1-1684229989980.png

If you see carefully, the Pulse remains high till next clock pulse, this could easily change address. I just had a doubt about it since it was not responding.

After i modified the code this is the response. It replied immediately. I was always checking logic analyzer bus details below and not pulses. Seeing pulses created the doubt. 

macjanfernandes_2-1684230084998.png

Thank you for the support. This resolves my issue.

Regards,

 

Macjan.

 

 

960 Views
macjanfernandes
Contributor II

NXP,

Please also note that, RESET pin was kept High. at 3.3V for both the IC's during this test

Regards,

 

Macjan

0 Kudos