Dear Staff,
I have the attached schematic using PCA9685PW , and I need to switch on RGB leds individually.
I have sent the following command succesfully in order to set the PCA9685PW internal register for open drain configuration
REGISTER: 0x01, ADDRESS: 0x10--->INVRT=1, OUTDRV=0
but I cant figure out how can i individually switch on and off the leds , something like :
Can you please send the right i2C tranaction?
Thanks a lot.
Nicola
HI nikkolas
You can try as below mentioned:
The LEDn_ON_H output control bit 4, when set to logic 1, causes the output to be always
ON. The turning ON of the LED is delayed by the amount in the LEDn_ON registers.
LEDn_OFF[11:0] are ignored. When this bit = 0, then the LEDn_ON and LEDn_OFF
registers are used according to their normal definition.
The LEDn_OFF_H output control bit 4, when set to logic 1, causes the output to be
always OFF. In this case the values in the LEDn_ON registers are ignored.
Thanks!
@guoweisun and thanks for support.
I tried what you suggest just for led 0 but nothing is happening. Following the commands I send and the device responses:
One think to consider, looking to the schematic , the LEDS power supply is not Vdd of the PCA9865 chip (3,3V) but its 5V...dont think this is an issue since I configure the GPIO like opendrain .
As you can see I correctly write LED0_ON_L=0x00 and LED0_ON_H=0x10 and i can even read the value back of the LED_ON_H back and just written correctly: im sorry but nothing happens into my board.
Traces on the PCB seems to be ok infact when i give power to the board , all RED led are on (dont know whyhonestly) , but when i send the first command (INVRT=1), they goes all down.
Do you have some ideas? Is the schematic the issue?
1
1:
You can see its LEDn channel structure which is push pull. so the high output is about VDD and low output is about ground,that's why we recommend application circuit drive MOSFET instead of directly drive LED.
In you case,you can pull up these LED into VDD and test again.
2: You can refer to below picture showed example3:
LEDn_ON[12] = 1; LEDn_ON[11:0] = 1022; LEDn_OFF[12] = 0; LEDn_OFF[11:0] = don’t care
LEDn_ON[12] bit=LEDn_ON_H[4]bit
Ho @guoweisun ,
thanks again.
I did a step further , I can switch on/off every LED0 channel (RED LED) in open drain configuration by :
deleting the sleep bit: MODE1=0x01
and by switching the LED0_OFF_H from 0x10 (off) to 0x00 (on)
I cant figure out why this configuration doesnt work for other LEDn.
I will try to investigate why by checking the PCB which seems to be ok , before to pull to 3,3V (Vdd) each leds and try the pushpull configuration you suggest.
One more thing,
do you have some use cases schematic in open drain mode ?
Thanks
The others channels should be configured with your test LED0 channel,you can check the PCB layout again.
I don't have your mentioned open drain reference design.