Hello,
This is my first post, I hope it follows the rules of the forum
I am trying to generate two squared waves for driving an H-Bridge.
The waves have a constant frequency of 50 [kHz] and 50% duty cycle.
The relevant pins are D9 and D11.
I've searched the web for generation of a single square wave but I didn't find something that really gave me a good answer. (Or maybe I just didn't understand it very well)
Using the PWM generation function doesn't get me to 50 [kHz] from what I've learnt.
From what I understand, I can generate a signal like that from D9 using the library Timer1. But this library doesn't work on pin D11 (unfortunately), only on D10 which I can't use.
In addition, I have to implement some sort of a "dead time" which is a parameter.
For instance, after D9 has completed 100 cycles it needs to be turned off and after X milliseconds have passed, D11 should be turned on and vice-versa.
I am looking for some guidance on how to do this the best way. (Not necessarily code, really just a "how to" approach)
Best regards,
Alex