Generating Sine wave PWM using 16F684 PIC

Discussion in 'Technical Support' started by monoposto, Nov 25, 2007.

  1. monoposto

    monoposto

    Joined:
    Nov 25, 2007
    Messages:
    1
    Likes Received:
    0
    Hi

    I'm currently attempting to design a small inverter as part of a larger Power Factor controller and I want to use a H-Bridge as the switching stage. I also want to use the PIC 16F684 as my controller as, according to the data sheet, it provides an enhanced PWM with built in Dead Bands to prevent shoot through current. Unfortunately, as my background is Power Engineering, I only have limited experience in PIC programming so I hope someone here may be able to provide guidance on a few queries.

    As the inplementation of the sine wave through the H-Bridge will entail using a PWM with a fixed period but with differing duty cycles, is it merely a question of using a look-up table to write the different duty cycles into the CCPR1L and DC1B resisters befor each PWM period? I am only asking this as there appears to be a note in the data sheet which states that 'changing the duty cycle will cause a glitch'. Obviously I appreciate that the PWM period and duty cycle times will need to be calculated using the oscillator timings and pre-scalers etc.

    Hoping someone can offer some experience on this subject.

    Lee
     
    monoposto, Nov 25, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.