0
\$\begingroup\$

I want to connect 8 LEDs to one GPIO. GPIO goes high LEDs turn ON, GPIO goes LOW LEDs turn OFF or opposite logic - both are acceptable. I want to have some sort of IC in between which allows me to select one or more LEDs to turn ON when my GPIO goes HIGH (or LOW). It will be convenient if I can do this selection using i2c. So, if I have LED1 ... LED8 and I have enabled 2, 5, 7 then I can do a PWM on my GPIO and only LED - 2, 5, 7 turn ON based on PWM. Rest (1,3,4,6,8) remain OFF.

I am looking at demultiplexer list on Digikey but haven't found the right IC yet. Can someone help me select a part number? The IC needs to generate a weak logic output only. I will use a mosfet/transistor to drive the LED from this weak logic output.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ In theory one output could control as many leds as you want and also control the brightnesses with pwm. You need a programmed microcontroller which gets commands serially via that one I/O-line. The command structure and transmission protocol are freely selectable if they are your own programming project. \$\endgroup\$
    – user136077
    Commented Feb 18, 2020 at 9:39

1 Answer 1

1
\$\begingroup\$

This would do it for you:
enter image description here

  • Short all the inputs A1 to A8 how ever you would want.

The serial control is selectable between I2C and SPI.
Both modes provide individual control of each independent switch so that any combination of switches can be applied. I2C mode provides two address select pins allow-ing for addressing up to four devices on a single bus. The SPI mode includes a DOUT pin that can be used to chain multiple devices together with a single select signal

\$\endgroup\$

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.