[Help] Half-Bridge PWM

Our range of tiny modules are designed to make it easy for you to quickly add functionality to your projects. [Module List]
Post Reply
Posts: 1
Joined: Fri Dec 12, 2014 9:54 pm

[Help] Half-Bridge PWM

Post by moneyp1000 » Fri Dec 12, 2014 9:58 pm

Code: Select all

#include "TimerOne.h"

void setup()
  pinMode(9, OUTPUT);
  Timer1.initialize(20);         // initialize timer1, and set at 50kHz
  Timer1.pwm(9, 256);         // setup pwm on pin 9, 25% duty cycle
  Timer1.pwm(10, 256);       // setup pwm on pin 9, 25% duty cycle

void loop()
  // your program here...

According to the code,To signal to image Phase shif

How can I modify the code ?

##Thank you very much##

Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia

Re: [Help] Half-Bridge PWM

Post by angusgr » Sun Dec 14, 2014 11:11 pm

I'm sorry, but I don't quite understand the questions.

You have PWM on pins 9 and 10 using Timer1, but there's a phase shift between them and you'd like to not have a phase shift? Is that right?

Post Reply