Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Dead band delay(PWM1CON) problem...

Status
Not open for further replies.

kvrajasekar

Junior Member level 3
Joined
Sep 18, 2008
Messages
28
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,517
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:
   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
[/code]
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top