While learning more about Servos, the main thing i have learned is that, Servos (SG90) need PWM signal with the frequency of 50Hz. And the duty cycle of the frequency is used to rotate the angle of the motor.
I know generating PWM with variable duty cycle is possible in PWM pins using Timers but i don't understand how the arduino Servo.h library makes digital pins act like PWM too , whenever i connect the servo to any one of the digital pins of the arduino and code accordingly.
So how does Arduino 'Servo.h' Library manage to make a digital pin act like a PWM and what should the native AVR C code for this action look like?
I am trying to avoid third party libraries as much as possible and trying to learn Embedded systems thoroughly.
Please do not suggest big banging PWM method.
Thanks...