Hello,
I tried to copy over the interrupt register saving routines used on other 16F MCU's to the 16F1827
but it is not cooperating![]()
I am getting errors of "symbol not previously defined" for T1CON.0 , PIE1.0 and PIR1.0 in addition
to "missing argument(s)"....what is going on?
See below
[ code]
myint
movwf wsave ; these commands are necessary to preserve registers to prevent
swapf STATUS, W ; corruption
clrf STATUS
movwf ssave
movf PCLATH, W
movwf psave
; Save and restore FSR and any other registers used
bcf T1CON.0 ; stop timer 1
bcf PIR1.0 ; clear over flow flag
movwf 00h ; load timer for 16,535 * 8 prescaler interrupt on 16 bit timer
movf TMR1H,W
movf TMR1L,W
bsf T1CON.0 ; re-enable timer 1
bcf PIE1.0 ; clear overflow flag just in case
; Restore saved registers
movf psave, W ; reload system register to previous values before interrupt was called
movwf PCLATH
swapf ssave, W
movwf STATUS
swapf wsave, F
swapf wsave, W
retfie ; Return from interrupt
endasm
[ /code]
Bookmarks