This about using an ATTiny817 Xplained mini to drive 2 HXT900 servos using the 12-bit timer.
There is a One Ramp mode example and a Two Ramp mode example.
One Ramp Two Ramp
Degree/step 0.44 0.22
I apologize, I made a mistake in my explanation of the Clock system in the ATtiny817. The codes are correct except for the define for F_CPU when using a Peripheral Clock divisor
other than 1.
Refer to figure 11-1 in the Datasheet.
#define F_CPU should be the MAIN Clock divided by the System Clock Prescaler. The default setting is 20000000 / 6 = 3333333.
© 2020 Microchip Technology Inc.