Being a beginner in embedded programming i am a bit confused how and where to start with. Can anyone please suggest me some tutorials or links where i can learn the coding of such emulations.
This will end up being slower than the internal PWM hardware.
Have you tried to see what F you need and what pre-scaler changes can be made to default counter clock?
For standard Arduinos the system clock is 16MHz so that the timers are clocking at 250kHz by default. Phase correct 8-bit PWM mode takes 510 clocks to cycle and fast 8-bit PWM mode takes 256. This means a frequency of 490Hz for pins 5 and 6.