Pages: [1]   Go Down
Author Topic: Due PWM Dimming Resolution Only 8 bit?  (Read 296 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,
I'm running some tests on the Due PWM resolution and frequency capabilities for an LED project and though I've set the analogWriteResolution() to 12 bits and can send 12bit (0-4095) counts to the write function, when I measure the duty cycle on a scope it only shifts every 16 counts.  This works out to 256 levels of dimming or 8 bits.  I also played with the pwm01 library and was able to change the frequency with no problems however, even though using the pwm_set_resolution(16) function allowed me to write 16 bit counts, the PWM duty cycle shift again only worked out to be 256 levels of dimming.
I've searched the forum for confirmation of this and think I found a thread in Italian that touches on it but I'd like to confirm it.
Is this the case and is there a method out there to get true 12 or 16 bit resolution PWM dimming from the Due without buying an external device?       
Thanks,
DD
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11672
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/en/Reference/AnalogWriteResolution
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the link, Mark.  I did read that and I set analogWriteResolution() to 12 bits.  It doesn't change the 256 dimming levels of the PWM output though. Instead of shifting the duty cycle every count, it shifts every 16 (12 bit) counts.  Same resolution...
Fortunately I've found a solution. I am able to get full 12 bit PWM dimming resolution using the adafruit 12 bit servo driver board.
Thanks,
Dave 
Logged

Pages: [1]   Go Up
Jump to: