Page 1 of 1

Stuck Value in PCA9685

Posted: Fri May 23, 2014 6:02 pm
by Meldrath
Have you guys ever encountered having a 'stuck' pwm value in the pca9685? It persists through power cycles, and I've tried to understand the data sheet for it. The best thing I can come up with is it's in restart mode but I don't quite get how to send the appropriate signals to it to reset the chip.

Kraven did a test where he put it on a mega and uploaded his pca9685 library, he could write to the chip, but every time we power cycled the 'stuck' value would show up. I've tried to just write to the chip (same methods as you use in your expansion) and it doesn't change the pwm output at all due to this.

Any help would be appreciated. If you can walk me through why you do what you do on the RA code, I could probably understand how to send the appropriate information.

Re: Stuck Value in PCA9685

Posted: Fri May 23, 2014 6:14 pm
by rimai
Could be a burned out channel to.

Re: Stuck Value in PCA9685

Posted: Fri May 23, 2014 6:24 pm
by Meldrath
It's all the channels, and Kraven verified the registers are receiving new values. As he was able to read and write to all of them.

Re: Stuck Value in PCA9685

Posted: Sat May 24, 2014 10:13 am
by KRavEN
I'll look at the docs for the chip when I get a chance but it looked to me like you had unintentionally set a default pwm value to all the channels. When testing the chip I was able to write a new value and then read it back to verify it was set properly so your lights should dim properly when you figure out what you broke in your code. Are you able to use my library to set the value to something else like I did when I was testing? I would start there and not worry too much about the default value because it was low, which is a lot better than it being 4096 and blasting everything full blast when the chip powers up.

Re: Stuck Value in PCA9685

Posted: Sat May 24, 2014 11:49 am
by Meldrath
But when I write a value to the chip, it's not actually doing the pwm for that value. It's just staying at that default value. The registers are taking the new value, but the pwm isn't going to the new value.

I believe the chip is in restart mode or somehow the oscillator was turned off. From the data sheet, "[3] No PWM control is possible when the oscillator is off."