avinashnp007
Newbie level 3
I have asm program for generating pwm for pic18f452, i have checked it in proteus and it is working fine. But i dont kno why i am not getting any output when i implement it on hardware. here is the program.
LIST P=PIC18F452, F=INHX32, N=0, ST=OFF, R=HEX
#include P18F452.INC
CONFIG OSC=HS, OSCS=OFF
CONFIG WDT=OFF
CONFIG BORV=45, PWRT=ON, BOR=ON
CONFIG DEBUG=OFF, LVP=OFF, STVR=OFF
ORG 00H
BCF TRISC,CCP1
CLRF CCP1CON
CLRF TMR2
MOVLW D'124'
MOVWF PR2
MOVLW D'62'
MOVWF CCPR1L
MOVLW 0X0C
MOVWF CCP1CON
MOVLW 0X02
MOVWF T2CON
AGAIN BCF PIR1,TMR2ON
OVER BTFSS PIR1,TMR2ON
BRA OVER
GOTO AGAIN
END
plz check wheather configuration bits are correct....
LIST P=PIC18F452, F=INHX32, N=0, ST=OFF, R=HEX
#include P18F452.INC
CONFIG OSC=HS, OSCS=OFF
CONFIG WDT=OFF
CONFIG BORV=45, PWRT=ON, BOR=ON
CONFIG DEBUG=OFF, LVP=OFF, STVR=OFF
ORG 00H
BCF TRISC,CCP1
CLRF CCP1CON
CLRF TMR2
MOVLW D'124'
MOVWF PR2
MOVLW D'62'
MOVWF CCPR1L
MOVLW 0X0C
MOVWF CCP1CON
MOVLW 0X02
MOVWF T2CON
AGAIN BCF PIR1,TMR2ON
OVER BTFSS PIR1,TMR2ON
BRA OVER
GOTO AGAIN
END
plz check wheather configuration bits are correct....