Enhanced PWM Full-Bridge Mode


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2021
    Location
    Illinois, USA
    Posts
    10

    Default Enhanced PWM Full-Bridge Mode

    Hello everyone,
    I searched all the forum topics on motor control I could find and went through the manual but I am still at a loss for how to use the Enhanced PWM Full-Bridge mode in PBP for a 18F46K80. Does PBP support this mode or do I have to do an assembly routine that gets called from PBP?

    Thanks for any help that can be given.

    Paul

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,368


    2 out of 2 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Enhanced PWM Full-Bridge Mode

    PBP support this mode or do I have to do an assembly routine that gets called from PBP?
    its not supported, no need to resort to asm though
    simply set the required sfr registers yourself
    eg
    Code:
       CCP2CON   =  %10001100                      ;enh pwm complementary output
       CCPTMRS   =  CCPTMRS  & %11110011   ;tmr2 for ccp2
       T2CON       =  %00000101 
       PWM2CON  = 10                                     ;dead time
       ccpr2l        = 128
    Warning I'm not a teacher

  3. #3
    Join Date
    Dec 2021
    Location
    Illinois, USA
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: Enhanced PWM Full-Bridge Mode

    Quote Originally Posted by richard View Post
    its not supported, no need to resort to asm though
    simply set the required sfr registers yourself
    eg
    Code:
       CCP2CON   =  001100                      ;enh pwm complementary output
       CCPTMRS   =  CCPTMRS  & 110011   ;tmr2 for ccp2
       T2CON       =  000101 
       PWM2CON  = 10                                     ;dead time
       ccpr2l        = 128
    In looking at the code I think the CCP2CON would have to be 01xx1100 for forward or 11xx1100 for reverse. I think that is what I got from the manual.
    Thanks again.

Similar Threads

  1. Replies: 4
    Last Post: - 7th June 2011, 06:02
  2. Need guidance with DC motor controller - PWM & H-Bridge
    By rfetech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th November 2010, 04:33
  3. PWM with PIC16F88 controlling h-bridge
    By deimantas in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 20th May 2010, 23:03
  4. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 23:18
  5. Using HPWM in half bridge mode on 16f690
    By Chris Barron in forum mel PIC BASIC
    Replies: 0
    Last Post: - 29th December 2006, 12:18

Members who have read this thread : 2

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts