Mercurial > public > hwos_code
comparison src/isr.asm @ 147:fdd4e30846ae
some cleanup
author | heinrichsweikamp |
---|---|
date | Wed, 06 Aug 2014 11:59:04 +0200 |
parents | e3ac5b2021bc |
children | 022b886eddaf |
comparison
equal
deleted
inserted
replaced
146:d6ad414c7c12 | 147:fdd4e30846ae |
---|---|
52 | 52 |
53 ; Pressure sensor and others | 53 ; Pressure sensor and others |
54 btfsc PIR5,TMR7IF ; Timer 7 | 54 btfsc PIR5,TMR7IF ; Timer 7 |
55 rcall isr_tmr7 ; Every 62,5ms | 55 rcall isr_tmr7 ; Every 62,5ms |
56 | 56 |
57 ;; IR-Link (again) | |
58 ; btfsc PIR3,RC2IF ; UART2 | |
59 ; rcall isr_uart2 ; IR-Link | |
60 | |
61 ; RTCC | 57 ; RTCC |
62 btfsc PIR3,RTCCIF ; Real-time-clock interrupt | 58 btfsc PIR3,RTCCIF ; Real-time-clock interrupt |
63 rcall isr_rtcc ; May return in bank common! | 59 rcall isr_rtcc ; May return in bank common! |
64 | 60 |
65 movff isr_prod+1,PRODH | 61 movff isr_prod+1,PRODH |
72 banksel RCREG2 | 68 banksel RCREG2 |
73 movf RCREG2,W | 69 movf RCREG2,W |
74 bcf RCSTA2,CREN ; Clear receiver status | 70 bcf RCSTA2,CREN ; Clear receiver status |
75 bsf RCSTA2,CREN | 71 bsf RCSTA2,CREN |
76 banksel isr_backup | 72 banksel isr_backup |
77 bcf PIR3,RC2IF ; Clear flag | |
78 incf ir_counter,F ; Increase counter | 73 incf ir_counter,F ; Increase counter |
79 movff ir_counter,isr1_temp ; Copy | 74 movff ir_counter,isr1_temp ; Copy |
80 dcfsnz isr1_temp,F | 75 dcfsnz isr1_temp,F |
81 movwf ir_buffer+.0 | 76 movwf ir_buffer+.0 |
82 dcfsnz isr1_temp,F | 77 dcfsnz isr1_temp,F |
855 movlw d'1' | 850 movlw d'1' |
856 subwf desaturation_time+0,F | 851 subwf desaturation_time+0,F |
857 movlw d'0' | 852 movlw d'0' |
858 subwfb desaturation_time+1,F ; reduce by one... | 853 subwfb desaturation_time+1,F ; reduce by one... |
859 | 854 |
860 ; Increase surface interval timer | 855 ; Increase surface interval timer |
861 movlw d'1' | 856 infsnz surface_interval+0,F |
862 addwf surface_interval+0,F | 857 incf surface_interval+1,F |
863 movlw d'0' | |
864 addwfc surface_interval+1,F | |
865 return ; Done | 858 return ; Done |
866 | 859 |
867 check_nofly_desat_time3: | 860 check_nofly_desat_time3: |
868 clrf surface_interval+0 | 861 clrf surface_interval+0 |
869 clrf surface_interval+1 ; Clear surface interval timer | 862 clrf surface_interval+1 ; Clear surface interval timer |