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?
Bookmarks