diff options
-rw-r--r-- | software/idm/idm.asm | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/software/idm/idm.asm b/software/idm/idm.asm index cceaa0e..f6b2320 100644 --- a/software/idm/idm.asm +++ b/software/idm/idm.asm @@ -102,14 +102,14 @@ int_tmr2 bsf ADCON0,GO call wbuf_next btfsc OVERRUN - retfie + goto int_end + int_tmr2_adcon btfsc ADCON0,GO goto int_tmr2_adcon movf ADRESH,w movwf INDFW - retfie - + goto int_end int_spi bcf PIR1,SSP1IF @@ -119,7 +119,18 @@ int_spi movf TMP,w movwf SSP1BUF movlb b'00000000' - retfie + +int_end + movlb .31 + movf FSR0H,w + movwf FSR0H_SHAD + movf FSR0L,w + movwf FSR0L_SHAD + movf FSR1H,w + movwf FSR1H_SHAD + movf FSR1L,w + movwf FSR1L_SHAD + retfie ;; ------------------------------------- ;; SUBROUTINES @@ -259,6 +270,7 @@ init movwf SSP1CON3 movlw b'00100100' movwf SSP1CON1 + bsf DBG0 ;; BANK 3 movlb b'00000011' @@ -296,7 +308,6 @@ init bcf FILTER_EN bsf INT - bcf DBG0 call wbuf_reset call rbuf_reset @@ -306,9 +317,12 @@ init ;; ------------------------------------- ;; MAINLOOP main - bcf DBG0 + btfsc DBG0 goto main + call rbuf_next + goto main + ;; ------------------------------------- ;; END end |