Hello good afternoon friends, I tell you that I am new to learning microcontrollers, now I am trying to use timer 1, using the overflow interrupt in PIC 12F629, the program what I would have to do is
for about half a second to turn on a LED and another half second to turn it off and so on, I don't know if I am making a mistake in the configuration or I need to add something to the interrupt service subroutine, of course thanks for your help, the program is following:
prueba04.asm [986]
I copy it and paste it below:
; test_04 = It is about using, configuring and implementing timer 1
; of PIC 12F629 causing an LED to light around medium
; second and turn off about half a second successively.
LIST P = 12F629
INCLUDE <P12F629.INC>
__CONFIG _CP_OFF & _CPD_OFF & _WDT_OFF & _BOREN_OFF & _MCLRE_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
#DEFINE LED GPIO, GP0
ORG 0
goto Home
ORG 4
goto Interrupcion_TMR1
Start
bsf STATUS, RP0
clrf TRISIO
call 03FFh
movwf OSCCAL
movlw b'00000001 '
movwf FOOT1
bcf STATUS, RP0
movlw b'00000000 '
movwf TMR1L
movwf TMR1H
movlw b'00110101 '
movwf T1CON
movlw b'11000000 '
movwf INTCON
Principal
Main goto
TM_1 interruption
movlw b'00000000 '
movwf TMR1L
movwf TMR1H
btfsc LED
goto is on
bsf LED
goto FinInterrupcion
Its on
bcf LED
End Interrupt
bcf PIR1, TMR1IF
retfie
ORG 03FFh
retlw b'10000000 '
END