I2C I/O expander PCAL6524 malfuntion - Page 1
Forum section: electronics / projects

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 12:43:45 pm
content: I have two PCAL6524, I2C I/O expanders. One of them always works fine, but the other eventually starts failing updating its outputs.I can write/read correctly via I2C but somehow it fails updating the outputs. The only difference between the one that works an the one that fails its that the one that fails has its ADDR pin connected to VDD instead of GND as the other.If i reset the IC it starts working again but eventually fails again.I am out of ideas, any help will be wellcome, thanks

author: brumbarchris
author_rank: Regular Contributor
timestamp: September 02, 2024, 12:57:18 pm
content: If you swap the two ICs in their circuits, does the problem follow the IC or the circuit?Cristian

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 01:04:04 pm
content: Hi Cristian,The ICs are Okey, there are like 5 PCBs mounted like this and its always the same IC, another test i made its if i communicate with just one works fine, the problem its when i try to communicate with both and its always the same.

author: Kjelt
author_rank: Super Contributor
timestamp: September 02, 2024, 01:25:45 pm
content: The speed with which you write the outputs is it high? Can you lower the i2c frequency?

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 01:30:42 pm
content: I have try to lower the speed yes, I have try with all API's available speeds 100kHz, 400kHz and 1MHz.Thank you for your time.

author: Kjelt
author_rank: Super Contributor
timestamp: September 02, 2024, 01:46:28 pm
content: If the one IC fails can you still read write correctly the other IC, in other words the I2C bus is still working and the erroneous chip does not pull down any of the i2c lines ?Did you check with a scope preferably with i2c protocol analyzer if some errors occur on the bus prior to the ic malfunctioning ?

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 01:58:29 pm
content: Hi Kjelt,the I2C bus its okey, even when it fails i can still read/write registers even in the IC that fails, the problem its with the outputs of the IC. Imagine I write in the IC that the output 'x' is on 1, then i read the corresponding register and it has write it correctly, but somehow the output its a 0 or oscillates.I haven´t checked it with a scope, but the Renesas API doesn't generates any error message with the communication.TY.

author: Kjelt
author_rank: Super Contributor
timestamp: September 02, 2024, 02:18:49 pm
content: Quote from: abelCortex on September 02, 2024, 01:58:29 pmThat I never ever saw, if you did not state that this occurred on 5 pcb's I would have said ESD damage of the chip.Really weird. Only thing I can think of is power supply glitch at that ic, is it properly decoupled and have you checked the power supply directly on the chip with a scope ?I am out of idea's, never used this particular chip but perhaps someone else has.

author: Kjelt
author_rank: Super Contributor
timestamp: September 02, 2024, 02:23:10 pm
content: Quote from: abelCortex on September 02, 2024, 12:43:45 pmDid you use Vdd I2C-bus and not Vdd-p according to the datasheet?

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 02:26:14 pm
content: I'm gonna try it, it makes sense. Thank you for the ideas.

author: abelCortex
author_rank: Contributor
timestamp: September 02, 2024, 02:38:10 pm
content: I have the Vdd(I2C-bus) and Vdd-p connected to the same voltage, 3.3VAs I understand it one it the IC suply and the other the reference voltage of the bus.

author: ledtester
author_rank: Super Contributor
timestamp: September 02, 2024, 05:08:50 pm
content: You could try connecting ADDR to SCL or SDA for a different address and changing your code appropriately.Also, is there a specific sequence of I2C operations which reliably trigger the problem?

author: xvr
author_rank: Frequent Contributor
timestamp: September 02, 2024, 06:14:28 pm
content: May be load of second I2C chip is not 'pure' load, but sometimes override PCAL6524 output?

author: abelCortex
author_rank: Contributor
timestamp: September 03, 2024, 06:08:49 am
content: Hi thank you for asking,There is no a particular sequence that triggers the problem, just the normal program sequence, I'm gonna try to scope the ADDR pin and see if there is a glich.With the not 'pure' load you mean if there is a V_ref like gnd or a 3.3V maybe overriding the output. That should t be possible because the first IC is connected the same way and gives no problems.

author: Irilia
author_rank: Regular Contributor
timestamp: September 03, 2024, 07:01:02 am
content: Quote from: abelCortex on September 02, 2024, 12:43:45 pmI know you have try changing the ic from one place to another, but do you have try replacing the 2 ic by two new ones ?

author: abelCortex
author_rank: Contributor
timestamp: September 03, 2024, 07:20:18 am
content: Okey, I have detected a glitch on the Positive ADDR pin, now i'm trying to solve it with a bigger capacitor, any idea?

author: Kjelt
author_rank: Super Contributor
timestamp: September 03, 2024, 07:56:20 am
content: Quote from: abelCortex on September 03, 2024, 07:20:18 amFirst you have to find out what causes the glitch.How much mA's are your outputs delivering or are they only sinking ?Your IC should have at least 100nF but if you use MLCC please derate and I would add some more.Perhaps an RC for the ADDR line so that is safe. But it sounds like the switching on the outputs of your ic where they deliver current causes the drop in voltage but you have the hardware and schematic you have to find the root cause out. Just pasting another capacitor on it till the Vcc is stable is in my dictionary "quick and dirty"If it is hobby go ahead, if it is a product for a company.......

author: abelCortex
author_rank: Contributor
timestamp: September 03, 2024, 08:42:01 am
content: Thank you Kjelt,At least now I know that probably that is what causes the problem, a drop on ADDR may cause a logic 0, you think that using the 5VDC instead of 3.3VDC would help to avoid that.

author: Kjelt
author_rank: Super Contributor
timestamp: September 03, 2024, 10:53:08 am
content: It should not matter AFAIK.For testing you could use the tip from ledtester above and connect ADDR to SCLStill the VCC should be stable during switching the outputs.

author: Irilia
author_rank: Regular Contributor
timestamp: September 03, 2024, 11:05:03 am
content: Quote from: Kjelt on September 03, 2024, 10:53:08 amThey will get a different address addr can be connected to Gnd, VCC, SCL, SDA

author: abelCortex
author_rank: Contributor
timestamp: September 03, 2024, 11:20:35 am
content: I have seen that in some schemes but i really don't know how can this works connecting the ADDR at the clock signal.And Irilia responding to you last post, its not problem of the IC itself you can swap them and the problem will happen in the same IC, the one connected to ADDR to Vdd.

author: ledtester
author_rank: Super Contributor
timestamp: September 04, 2024, 03:15:34 am
content: Quote from: abelCortex on September 03, 2024, 11:20:35 amIt's a scheme used by a lot of I2C devices. Just trust that it works. Of course, it will change the I2C address of the chip so you'll have to change your code. Maybe write some simple test code to verify the address has changed.And it will be helpful to isolate a particular sequence of I2C interactions which reliably trigger the problem.