hi friends!
just now i started coding on pic16f676. below code is written for toggling port with delay. this code is not working when i burn it into ic. it's working on simulator.
__CONFIG _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
ORG 00
GOTO START
ORG 0x04
RETFIE
ORG 0x50
START NOP
BANKSEL TRISC
CLRW
MOVWF TRISC
MOVWF ANSEL
MOVLW 0xFC
MOVWF OSCCAL
BANKSEL PORTC
BCF INTCON,GIE
MOVLW 0x15
MOVWF PORTC
HERE1 COMF PORTC,F
CALL RDELAY
HERE GOTO HERE1
RDELAY MOVLW 0x05
MOVWF 0x31
MOVLW 0x0FF
MOVWF 0x32
MOVWF 0x33
B1_RDELAY DECFSZ 0x33,F
GOTO B1_RDELAY
DECFSZ 0x32,F
GOTO B1_RDELAY
DECFSZ 0x31,F
GOTO B1_RDELAY
RETURN
END
just now i started coding on pic16f676. below code is written for toggling port with delay. this code is not working when i burn it into ic. it's working on simulator.
__CONFIG _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
ORG 00
GOTO START
ORG 0x04
RETFIE
ORG 0x50
START NOP
BANKSEL TRISC
CLRW
MOVWF TRISC
MOVWF ANSEL
MOVLW 0xFC
MOVWF OSCCAL
BANKSEL PORTC
BCF INTCON,GIE
MOVLW 0x15
MOVWF PORTC
HERE1 COMF PORTC,F
CALL RDELAY
HERE GOTO HERE1
RDELAY MOVLW 0x05
MOVWF 0x31
MOVLW 0x0FF
MOVWF 0x32
MOVWF 0x33
B1_RDELAY DECFSZ 0x33,F
GOTO B1_RDELAY
DECFSZ 0x32,F
GOTO B1_RDELAY
DECFSZ 0x31,F
GOTO B1_RDELAY
RETURN
END