I have read on the website that the 12 PWM output pins on the Due are 8-bit. However, it also says that the output of the PWM pins can be changed with the analogWriteResolution() command.
Is it therefore possible to use the 12 PWM outputs with 12-bit resolution? Or are the only 12-bit resolution outputs on the board the two DACs?
I did read that page, but it is still unclear to me.
"The Due has the following hardare capabilities:
12 pins with 8-bit PWM (as the other AVR based boards)
2 pins with 12-bit DAC (Digital-to-Analog Converter)
By setting the write resolution to 12, you can use analogWrite() with values between 0 and 4095 to exploit the full DAC resolution or to set the PWM signal without rolling over. "
Does that mean the PWM outputs can be used to get 12-bit resolution, or just that it evenly distributes 8-bit resolution over 12 bits?
PWM_CPRD (to set the frequency) is a 16-bit register and PWM_CDTY (to set the duty cycle) is a 16-bit register, therefore the maximum resolution of the PWM controller is 16-bit. Note that TC_RC (to set the frequency) is a 32-bit register, idem for TC_RA (to set the duty cycle).