Stuck Value in PCA9685


Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Fri May 23, 2014 6:02 pm
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.

Posts: 12288
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri May 23, 2014 6:14 pm
Could be a burned out channel to.
Roberto.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Fri May 23, 2014 6:24 pm
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.

Posts: 104
Joined: Sun Mar 17, 2013 8:21 am
PostPosted: Sat May 24, 2014 10:13 am
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.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Sat May 24, 2014 11:49 am
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."

Return to Ask anything here

Who is online

Users browsing this forum: No registered users and 2 guests

cron