So I'm trying to bring up a new SPI LED driver that I've never used before PCA9745B. and I'm getting a really weird bug.

When writing identical data to the chip, using identical LEDs and nearly identical trace layout. Some of the LEDs barely turn on while others seem to function perfectly. The pattern of bright v dim LEDs is constant per chip but is different between chips. Each of my boards has two driver chips. I've tried swapping the position of the two chips and the position of the bright/dim LEDs swaps accordingly. New chips give new patterns.

Chips are wired like so with LED_CS, LED_MOSI, LED_MISO, and LED_CLK connected to a micro controller enter image description here

LEDs are wired like so enter image description here

The LEDs used are 732-4980-1-ND, 511-1589-1-ND, and 732-4978-1-ND

The data being written out on the LED_MOSI line is as follows

send_SPI2(0b0000001000010000, 0b0000001000010000); //MODE2 Clear Errors
send_SPI2(0b0000001000000000, 0b0000001000000000); //MODE2 Reset?
send_SPI2(0b0000010001010101, 0b0000010001010101); //LED0-3 state 01
send_SPI2(0b0000011001010101, 0b0000011001010101); //LED4-7 state 01
send_SPI2(0b0000100001010101, 0b0000100001010101); //LED8-11 state 01
send_SPI2(0b0000101001010101, 0b0000101001010101); //LED12-15 state 01
send_SPI2(0b1000001010000000, 0b1000001010000000); //IREFALL Mid brightness

These two pictures show the output on two identical boards running identical firmware with all LEDs supposed to be on (only the PCA9745B chips have been swapped)

enter image description here

Things I've tried:

  • I've scoped the data being sent to my chips and they appear to be getting exactly what I'd expect.
  • I can turn on any individual LED or group of LEDs with no problems except the brightness. Setting the current value for the bright LEDs changes their output as one would expect but has no effect on the dim LEDs except for turning them off when current is set to zero.
  • Setting the brightness value for each LED individually has the same effect, works fine for the bright LEDs, does nothing for the dims.
  • Just turning on one LED makes no difference, it will stay either bright or dim
  • I've considered that I may have damaged the chips somehow and swapped them out but this doesn't help other than to change which LEDs are bright.
  • I've swapped the LEDs around in case there was some sort of variability in the Vf but the brightness stays constant per position regardless of which LED is there.
  • I've tried reading out all the error registers on the chip and get no errors anywhere *I've re-flowed the chips and made sure the thermal pad is properly soldered down *I've bumped the value of Rext(current limiting) both up and down with no impact

At this point I'm pretty much at a loss for what to try next. My one thought is that the LEDs could need a resistor in series to compensate for slightly different Vf values but the datasheet says the chip should be able to handle this so I'm doubtful that's the solution. If you've used this chip before or have any insights I'd appreciate any suggestions!

  • \$\begingroup\$ This is a very good example of how to ask a question. \$\endgroup\$
    – domen
    Jun 5, 2019 at 6:57

1 Answer 1


At least Rext should go to ground, not to 3V3. That could mess the whole thing up.

  • \$\begingroup\$ Oh dear lord I can't believe I did that, thank you \$\endgroup\$
    – Indigo
    Jun 4, 2019 at 18:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.