18F4620 HPWM Half Bridge Mod problem


Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Is it still only showing a PWM signal on P1A? Are you running this in ISIS or on a real PIC?
    More info would help.

    Edit: I ran this through MPSIM with the logic analyzer on P1A and P1B. Sure looks like it works.
    Code:
    DEFINE	OSC 20
    Duty VAR WORD ' 5%=25, 95% = 450
    TRISC.2=0
    TRISD.5=0
    T2CON = %00000101  ' Timer2 ON, prescale 1:4
    PR2 = 124          ' 10kHz
    CCP1CON = %10001100' half-bridge with P1A & P1B
    PWM1CON = %10001111' set dead-time
    
    Loop:
      For Duty = 25 TO 450  ' from 5% to 95% duty
       CCP1CON.4 = Duty.0	' Setup 10-bit duty cycle as
       CCP1CON.5 = Duty.1	' a 10-bit word
       CCPR1L = Duty >> 2
       PAUSEUS 24
      Next
      Goto loop
    	
      End
    Screen capture of MPSIM logic analyzer attached.

    Might be a problem with ISIS or your config settings?
    Attached Images Attached Images  
    Last edited by Bruce; - 31st October 2007 at 21:04.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Using HPWM in half bridge mode on 16f690
    By Chris Barron in forum mel PIC BASIC
    Replies: 0
    Last Post: - 29th December 2006, 11:18
  2. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  3. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  4. HPWM problem .. pls help!
    By Samuel in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 1st February 2006, 15:30
  5. problem ont hpwm on the pic16f767!!
    By oscar in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th May 2005, 10:41

Members who have read this thread : 0

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

Posting Permissions

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