Various aspects of home brew inverters


Author Message
tinyt
Guru

Joined: 12/11/2017
Location: United States
Posts: 471
Posted: 08:09pm 06 Nov 2018      

I also can confirm the presence of pwm pulses in stop mode. I have seen this before in my other projects using atmega pwm. Even though the compare value is zero, there will be one timer clock pulse at the compare output pin(s) every overflow. What I did is disconnect the compare output from the port pins. So in the code, this change worked for me:

cbi(PORTD,5);
cbi(DDRB,1); cbi(DDRB,2); // change direction to input, disconnect output compare(s)
}
else
{sbi(PORTD,5);
sbi(DDRB,1); sbi(DDRB,2);} // restore direction to output

The change is not needed since the SD of the IR2184 is already being used.Edited by tinyt 2018-11-08