LIST p=16F877A, W=2, X=ON, R=DEC ;tell assembler what chip we are using
include "P16F877A.inc" ;include the defaults for the chip
ERRORLEVEL 0, -302 ;suppress bank selection messages
__CONFIG 0x393A ;sets the configuration settings (oscillator type etc.)
cblock 0x20
.
.
.
.
.
.
.
.
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>frequency call>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ORG 0x0004
MOVWF w_temp ; save off current W register contents
MOVF STATUS,w ; move status register into W register
MOVWF status_temp ; save off contents of STATUS register
BTFSC T1CON, TMR1ON
goto Stop_timer1
CLRF TMR1H
CLRF TMR1L
BSF T1CON, TMR1ON
GOTO END_ANS_INT
Stop_timer1
BCF T1CON, TMR1ON
MOVF TMR1H, W
MOVWF TIMER1_HIGH
MOVF TMR1L, W
MOVWF TIMER1_LOW
BSF freq_over, 0X00
;BCF INTCON, INTE
END_ANS_INT
MOVF status_temp,w ; retrieve copy of STATUS register
MOVWF STATUS ; restore pre-isr STATUS register contents
SWAPF w_temp,f
SWAPF w_temp,w ; restore pre-isr W register contents
BCF INTCON, INTF
retfie
;=====================================================================