comparison src/isr.asm @ 50:ec4d8503ec45

NEW: user-selectable color schemes
author heinrichsweikamp
date Fri, 27 Sep 2013 23:45:57 +0200
parents 53a09c1b7410
children f3062a611eef
comparison
equal deleted inserted replaced
49:fe01bbaf6014 50:ec4d8503ec45
34 34
35 HighInt: 35 HighInt:
36 movff PRODL,isr_prod+0 36 movff PRODL,isr_prod+0
37 movff PRODH,isr_prod+1 37 movff PRODH,isr_prod+1
38 38
39 ; INT3 for RX control
40 btfsc INTCON3,INT3IF ; Timer3 INT
41 rcall isr_int3
42 ; Timer0 for RX timing
43 btfsc INTCON,TMR0IF ; Timer0 INT
44 rcall timer0int
45
46 ; Pressure sensor and others 39 ; Pressure sensor and others
47 btfsc PIR5,TMR7IF ; Timer 7 40 btfsc PIR5,TMR7IF ; Timer 7
48 rcall isr_tmr7 ; Every 62,5ms 41 rcall isr_tmr7 ; Every 62,5ms
49 42
50 ; Buttons 43 ; Buttons
68 movff isr_prod+1,PRODH 61 movff isr_prod+1,PRODH
69 movff isr_prod+0,PRODL 62 movff isr_prod+0,PRODL
70 retfie FAST ; Restores BSR, STATUS and WREG 63 retfie FAST ; Restores BSR, STATUS and WREG
71 64
72 ;============================================================================= 65 ;=============================================================================
73
74 timer0int:
75 bcf T0CON,TMR0ON ; Stop Timer 0
76
77 ; bcf LEDr;mH
78
79 movlw TMR0H_VALUE
80 movwf TMR0H
81 bcf INTCON,TMR0IF ; Clear flag
82 clrf TMR0L
83 bsf INTCON2,INTEDG3 ; INT3 on rising edge
84 return
85
86 isr_int3:
87 bcf INTCON3,INT3IF ; Clear flag
88 bsf T0CON,TMR0ON ; Start Timer 0
89 btg INTCON2,INTEDG3 ; Toggle INT3 edge
90
91 ; btg LEDr;mH
92
93 ; Reset RX Timeout
94 clrf TMR0L
95 movlw TMR0H_VALUE
96 movwf TMR0H
97 bcf INTCON,TMR0IF ; Clear flag
98 return
99
100 66
101 isr_uart2: ; IR-Link 67 isr_uart2: ; IR-Link
102 banksel RCREG2 68 banksel RCREG2
103 movf RCREG2,W 69 movf RCREG2,W
104 bcf RCSTA2,CREN ; Clear receiver status 70 bcf RCSTA2,CREN ; Clear receiver status