kvrajasekar
Junior Member level 3
pwm1con
Hi,
My dead band delay program is not working.I am using 16f716 in PWM mode(half bridge config).I introduced a dead band delay of 6us but i am not able to trace out the delay in MPLAB simulator.I tried with more delay,even i didnt get.
please help me where i am doing wrong,here is my code.Fosc-20MHZ,Fpwm-20KHZ
config bits : __CONFIG _PWRTE_ON & _XT_OSC & _WDT_OFF ; configuration switches
[/code]
Hi,
My dead band delay program is not working.I am using 16f716 in PWM mode(half bridge config).I introduced a dead band delay of 6us but i am not able to trace out the delay in MPLAB simulator.I tried with more delay,even i didnt get.
please help me where i am doing wrong,here is my code.Fosc-20MHZ,Fpwm-20KHZ
config bits : __CONFIG _PWRTE_ON & _XT_OSC & _WDT_OFF ; configuration switches
Code:
bsf STATUS, RP0 ;Bank1
errorlevel 1,-302 ; Don't warn me about bank 1
movlw b'00001111' ;Defining input and output pins
movwf TRISA ;Writing to TRISA register
movlw b'00010001' ;Defining input and output pins
movwf TRISB ;Writing to TRISB register 1-input,0-output
movlw b'10000111' ;TMR0,prescaler-8
movwf OPTION_REG
movlw 0x00
movwf ADCON1
clrf PIE1
bcf STATUS, RP0 ;Bank0
clrf PORTA ;potra,portb initially set to low
clrf PORTB
clrf PIR1
movlw b'10001100'
movwf CCP1CON
clrf CCPR1L
movlw 0xff
movwf PR2
movlw d'30'
movwf PWM1CON
clrf T2CON
clrf test
bsf T2CON,TMR2ON