analogWrite - bit resolution precision limit?

XOD servos accept a normalized floating value 0-1.0.
This, at least in the API, seems to elegantly allow, or at least imply, more than the default 8 bit (0-255) analog write resolution.

In particular, there is an Arduino function to set the bit precision called analogWriteResolution.
( )

Is there a XOD way of getting 10 or 12 bit PWM resolution?
Linear servos can easily use such resolution.

1 Like

which arduino are you using higher resolution PWM write is only applicable to zero, DUE and MKR (I may be wrong + happy to be corrected + learn something new)

1 Like

I think you are right if one wants to have straightforward solution using
analogWriteResolution (10); (or 12).

I did find this stack exchange showing how to do it on a Uno by using direct register control.

I think the Nano also has a 16-bit timer.

As usual, my question becomes, “What is the XOD way of doing this?”

1 Like

Have explored the servo node and the code within it that uses the servo.h file?

Double click on the node and it’s internal content will appear for you to read through