controlling PCA9685PW leds in open drain mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

controlling PCA9685PW leds in open drain mode

1,392件の閲覧回数
nikkolas
Contributor II

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

nikkolas_1-1748459951048.png

 

but I cant figure out how can i individually switch on and off the leds , something like  :

  1. switch on LED0
  2. switch on LED1
  3. switch on LED2
  4. delay
  5. switch off LED0
  6. switch off LED1
  7. switch off LED2

Can you please send the right i2C tranaction?

Thanks a lot.

Nicola

 

nikkolas_2-1748460244903.png

 

タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,372件の閲覧回数
guoweisun
NXP TechSupport
NXP TechSupport

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!

0 件の賞賛
返信

1,346件の閲覧回数
nikkolas
Contributor II

@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:

nikkolas_0-1748545751285.png

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?

0 件の賞賛
返信

1,330件の閲覧回数
guoweisun
NXP TechSupport
NXP TechSupport

1

1:

guoweisun_0-1748552318927.png

 

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

guoweisun_0-1748561214431.png

 

 

0 件の賞賛
返信

1,297件の閲覧回数
nikkolas
Contributor II

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

 

 

 

 

0 件の賞賛
返信

1,167件の閲覧回数
guoweisun
NXP TechSupport
NXP TechSupport

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.

0 件の賞賛
返信