I am building basically some thing like a AC motor controller, the design uses a full H-bridge to generate alternating current. I have 2 problems I cant figure out. First is I need a PWM signal, easy part, but I also need its logic level inverse, can I do this all inside a atmega328 or equivalent or do I need an external inverter. I would like very much to minimize the parts count. Second is how much trouble is it to change the PWM frequencies on the program end of thing and when the chip is on and running.