Skip to content

yuskegoto/PCA9956

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCA9956 Library for Arduino

This is Arduino library for I2C controlled LED driver PCA9956. The chips is capable to handle 24 channels of LEDs, however there is practically NO sample code nor information except this rather incomplehensible datasheet. So I hope this code can help someone who are struggling now to understand this guy. I have tested this code with Switchscience's breakout board. When all three address setting pins of PCA9956 are open state, the i2c address will be 0x3F.

Device datasheet

Product page of Switchscience

Implementation

  • Individual On-Off control
  • Individual PWM control
  • Individual Iref setting
  • PWM control with auto INCREMENT feature for faster communication
  • Multiple devices and sector management tool
  • Blink control

Procedure

Following is simplified procedure for hooking up the device.

1.Connect the power and i2c wires

Arduino PCA9956

5V VDD

GND GND

SDA SDA

SCL SCL

  1. Add pull up resistors between Vcc and each i2c wires (SDA / SCL). Please don't forget pull-up regestors!

  2. Upload your sketch!

Resistor Setting

As you can see on the code, I did only on/off and pwm control. Group dimming is also possible, even I haven't implemented yet. The resistor setting precedure for On/Off control is like this.

  1. Set up MODE1(Ox00) resistor

  2. Set up output mode setting LEDOUT0-5(0x02 - 0x7). One resistor has 4 LED's control state. Therefore one LED has two bits of control state... See the datasheet page 17.

    00: LED driver is off

    01: LED driver is fully on

    10: LED driver can be indivisually controlled from PWMx resistor or PWMALL resistor for all control

    11: LED driver's individual brightness and group's dimming/blinking can be controlled from PWMx and GRPPWM resistors

  3. IREF0 - 23(0x22 - 0x39) out put current control

This procedure is not written cleary on the datasheet. So I guess there are bunch of folks giving up before finding this procedure.

Actually I found this procedure from a comment I found on Amazon.jp's product page. Thanks!

Log

20220306: Yuske: Added group blink control

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages