Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/isr.asm @ 21:73014f788032
1.60 stable rc1
author | heinrichsweikamp |
---|---|
date | Wed, 21 Apr 2010 17:37:30 +0200 |
parents | 3b30cd739782 |
children | 65d5b0c8da41 |
comparison
equal
deleted
inserted
replaced
20:8824446f7241 | 21:73014f788032 |
---|---|
67 | 67 |
68 simulator_int: | 68 simulator_int: |
69 btfsc standalone_simulator ; ignore in standalone simulator mode | 69 btfsc standalone_simulator ; ignore in standalone simulator mode |
70 bra uartint1 | 70 bra uartint1 |
71 | 71 |
72 call set_LEDusb | 72 bsf LED_blue |
73 tstfsz RCREG ; =0x00? | 73 tstfsz RCREG ; =0x00? |
74 bra simulator_int1 ; No | 74 bra simulator_int1 ; No |
75 incf RCREG,F ; Yes, so force RCREG=1 | 75 incf RCREG,F ; Yes, so force RCREG=1 |
76 | 76 |
77 simulator_int1: | 77 simulator_int1: |
157 | 157 |
158 timer1int: | 158 timer1int: |
159 bcf PIR1,TMR1IF ; Clear flag | 159 bcf PIR1,TMR1IF ; Clear flag |
160 | 160 |
161 timer1int_debug: | 161 timer1int_debug: |
162 | 162 bcf LED_red ; LEDr off (For charge indicator) |
163 call clear_LEDr ; LEDr off (For charge indicator) | |
164 | 163 |
165 movlw 0x08 ; Timer1 int after 62.5ms (=16/second) | 164 movlw 0x08 ; Timer1 int after 62.5ms (=16/second) |
166 cpfslt TMR1H ; Did we miss a 1/16 second? | 165 cpfslt TMR1H ; Did we miss a 1/16 second? |
167 incf timer1int_counter1,F ; Yes, add extra 1/16 second | 166 incf timer1int_counter1,F ; Yes, add extra 1/16 second |
168 | 167 |
352 movlw d'23' | 351 movlw d'23' |
353 cpfsgt hours | 352 cpfsgt hours |
354 return | 353 return |
355 clrf hours | 354 clrf hours |
356 incf day,F | 355 incf day,F |
357 movlw plus_time_correction ; Correct too slow clock | 356 movlw plus_time_correction ; Correct too slow clock |
358 movwf secs | 357 movwf secs |
359 | 358 |
360 | 359 |
361 check_date: | 360 check_date: |
362 movff month,isr_divB ; new month? | 361 movff month,isr_divB ; new month? |
363 dcfsnz isr_divB,F | 362 dcfsnz isr_divB,F |