The PCA9955B is a 16-channel LED driver that features programmable PWM and current and has gradation support. It also features open/short detection for all of the 16 channels, which is reported in the 4 error flag registers EFLAG0 to EFLAG3. However when I read those registers I get inconsistent values. The EFLAGx registers are divided in two-bit quartets, which 2-bits indicate the status of error detection for each channel; zero means no error, 0x1 indicates a short circuit condition and 0x2 an open circuit.

Indeed the status register (MODE2) has bit 6 set, which means an error condition was detected on at least one channel but when I read the four EFLAG registers I get 0x80 four times, regardless of what channel is open or connected to a LED — I didn't try to short any. It occured while all of the 16 channels were connected and functional. But I also read those values on a previous board that had several channels not connected.

As the datasheet reports, error detection will no occur if the LDRx registers are set to 10b or 11b and the PWM value is less than 8 or equal to 255. It's not the case as I set the value for those registers to 0x20, which is between 8 and 255.

I am using an Atmel ATmega64M1 to do the I²C job with a software library of my own but I already ruled out possible errors on the bus. All I²C chips I've used with my library do work as expected and I compared my results with that of an Arduino and its hardware I²C support. I've also compared the signals with an oscilloscope and there's no difference. So I would tend to believe there's something particular with that chip that's not in the datasheet...

I hesitated to ask the first time I used the PCA9955B but now I have two of them fully working but that very feature, I'm posting my question here. Can anybody explain why I would get inconsistent values for the error detection while the chip seems to behave perfectly otherwise?

The chip is a PCA9955BTW I ordered from Digi-Key. Except on that very detail the chip conforms to the datasheet.

  • 1
    \$\begingroup\$ Can you use say an Arduino's HW I2C support to duplicate this issue? It has that chip erratum smell to me, but duplicating it with a HW peripheral is probably the best course of action here... \$\endgroup\$ Dec 2, 2016 at 12:39
  • \$\begingroup\$ I no longer have the means to do that but I will and report. \$\endgroup\$
    – user59864
    Dec 5, 2016 at 8:26

1 Answer 1


I know this is a very old topic, but I was running into the same issue using a PCA9956 (a 24 channel version) on STM32 and found a solution.

The problem is in the way the "auto increment" option is implemented (for reading multiple registers in a row), by default this only works for registers 0x00 to 0x3E and after that the register address rolls over. The EFLAG registers start at 0x41. This explains why you are not getting the expected values, you were looking at copies from other registers.

My solution was to just read each of these values individually. Write 0x41 (EFLAG0), read 1 byte, write 0x42 (EFLAG1), read 1 byte, etc.

This is not at all clear when reading the datasheet and should have been mentioned.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.