Mercurial > public > hwos_code
comparison src/isr.asm @ 490:8dfb93e80338
NEW: Deep Sleep mode for OSTC Plus and OSTC 2 (2017) (Entered automatically)
NEW: Logbook detail page in larger font (And nicer layout)
CHANGE: Sleep mode current slightly reduced for all hwOS devices
NEW: Logbook now records battery information
NEW: Markers in internal logbook drawn as small "m" next to the profile
author | heinrichsweikamp |
---|---|
date | Wed, 29 Mar 2017 21:35:12 +0200 |
parents | bab31db6e006 |
children | b7eb98dbd800 |
comparison
equal
deleted
inserted
replaced
489:22092d14fd8c | 490:8dfb93e80338 |
---|---|
314 bra isr_timer3_exit ; Exit | 314 bra isr_timer3_exit ; Exit |
315 | 315 |
316 | 316 |
317 ;============================================================================= | 317 ;============================================================================= |
318 | 318 |
319 isr_tmr7: ; each 62,5ms | 319 isr_tmr7: ; each 62,5ms |
320 bcf PIR5,TMR7IF ; clear flag | 320 bcf PIR5,TMR7IF ; clear flag |
321 banksel 0xF16 ; Addresses, F16h through F5Fh, are also used by SFRs, but are not part of the Access RAM. | 321 banksel 0xF16 ; Addresses, F16h through F5Fh, are also used by SFRs, but are not part of the Access RAM. |
322 movlw .248 | 322 movlw .248 |
323 movwf TMR7H ; -> Rollover after 2048 cycles -> 62,5ms | 323 movwf TMR7H ; -> Rollover after 2048 cycles -> 62,5ms |
324 | 324 |
325 banksel isr_backup | 325 banksel common |
326 movf max_CCPR1L,W ; Dimm value | |
327 cpfseq CCPR1L ; = current PWM value? | |
328 rcall isr_dimm_tft ; No, adjust until max_CCPR1L=CCPR1L ! | |
329 | |
330 banksel common | |
331 call get_analog_switches ; Get analog readings | 326 call get_analog_switches ; Get analog readings |
332 btfss INTCON3,INT1IE | 327 btfss INTCON3,INT1IE |
333 bra isr_tmr7_a | 328 bra isr_tmr7_a |
334 btfsc analog_sw2_pressed | 329 btfsc analog_sw2_pressed |
335 rcall isr_switch_left | 330 rcall isr_switch_left |
338 btfss INTCON,INT0IE | 333 btfss INTCON,INT0IE |
339 bra isr_tmr7_b | 334 bra isr_tmr7_b |
340 btfsc analog_sw1_pressed | 335 btfsc analog_sw1_pressed |
341 rcall isr_switch_right | 336 rcall isr_switch_right |
342 isr_tmr7_b: | 337 isr_tmr7_b: |
338 banksel common | |
339 btfss no_sensor_int ; No sensor interrupt (because it's addressed during sleep) | |
340 bra isr_tmr7_c ; No, continue | |
341 banksel isr_backup ; Back to Bank0 ISR data | |
342 return | |
343 isr_tmr7_c: | |
344 banksel isr_backup | |
345 movf max_CCPR1L,W ; Dimm value | |
346 cpfseq CCPR1L ; = current PWM value? | |
347 rcall isr_dimm_tft ; No, adjust until max_CCPR1L=CCPR1L ! | |
343 | 348 |
344 banksel isr_backup | 349 banksel isr_backup |
345 decfsz ir_S8_timeout,F ; IR Data still valid? | 350 decfsz ir_S8_timeout,F ; IR Data still valid? |
346 bra isr_tmr7_2 ; Yes, continue | 351 bra isr_tmr7_2 ; Yes, continue |
347 ; timeout, clear IR-Data | 352 ; timeout, clear IR-Data |