hi all, pls i am trying to generate a 50Hz square wave which i planned to use for PWM inverter and i am having few issues to resolve.
Firstly, do i have to make the square wave 25Hz each or make it 50Hz?
Secondly, Can i connect the output pin of my mcu directly to the gate of the mosfet?
And in the process of my simulation, i discovered that my square wave is not perfect like i thought. my program is as follow and the square wave i got.
i am using atmega328p as my mcu with 8MHz .
DDRB |= (1 << DDB1)|(1 << DDB2);
OCR1A = 624;
TCCR1A = 0x51;