|
ORG 0x004 ; interrupt vector
movwf w_temp ; save W and
movf STATUS ,w ; STATUS
movwf status_temp ; registers
bcf STATUS, RP0 ; bank0
btfsc INTCON, T0IF ; check if timer0 owerflow interrupt
goto int_t0
btfsc PIR1, TMR1IF ; check if timer1 owerflow interrupt
goto int_t1
btfsc INTCON, GPIF ; check if GPIO change interrupt
goto int_gpio
goto int_leave ; otherwise leave routine
....
....
....
int_gpio:
btfsc GPIO, BUT ; check if button released
goto int_gpio_leave
movlw MAX_TIME ; load ring durance
movwf timer_v ; in timer counter
movlw 0xFF
movwf s_enable ; unmute sound
int_gpio_leave:
bcf INTCON, GPIF ; clear GPIO change occurence flag
goto int_leave
int_leave:
movf status_temp, w
movwf STATUS
swapf w_temp, f
swapf w_temp, w
retfie
E-mail: info@telesys.ru