Arduino Nano and 10bit rezolution gimbal ?

Hi, i have 16Mhz arduino nano and and i want to control FPV camera gimbal motors at 10bit rezolution and 50Hz frequency with pots. I connected pots to A0 and A1 pins, and gimbal PWM inputs to nano D9 and D10 digital pins. I know that those digital pins are connected to timer1. Question is how to setup 16bit timer1 for 10bit gimbal ? How to control signal duty cycle with registers? I cant find the answer in the internet because all popular PWM libraries and examples i found was made for LEDs at first not for servos :frowning:

PWM libraries are made to toggle output pins. They do not care what it is attached to.

What do you mean by 10 bit resolution?

before going into complex stuff, have you tried the Servo library?

something to read : Secrets of Arduino PWM

Servo library for nano is 8bit (output resolution is 255). I need 10bit (output resolution is 1024).

Can you use writeMicroseconds()
and thus get 1000 steps from 1000 to 2000?
That's just shy of 10 bit resolution.

No, writeMicroseconds() is only 8bit for nano. Function writeMicroseconds() is interpolated to look like 10bit. But in real life resolution error is always +-4 Microseconds.

Get a proper servo driver

Why to buy something if nano have that capability?

If you are just controlling 1 Servo, just use the TimerOne library. It goes down to 1 us resolution and you can set PWM to 10 bits. Install it through the library manager.

Why to buy something if nano have that capability?

fair question
TimerOne library will deal with only 2 PWM pins (9 and 10). If you want a 3 axis gimbal you’ll miss one.
If you have only 2 axis that’s a possibility as long as you don’t need SPI communication.