# HG changeset patch # User heinrichsweikamp # Date 1294905945 -3600 # Node ID 17de42ab02b647f6af6dc0c5357261bd5394212c # Parent e5f1cfec8113a35b565a120ca427adfb1757a0a6 realtime clock defaults diff -r e5f1cfec8113 -r 17de42ab02b6 code_part1/OSTC_code_asm_part1/adc_rtc.asm --- a/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Jan 12 14:38:24 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/adc_rtc.asm Thu Jan 13 09:05:45 2011 +0100 @@ -234,9 +234,9 @@ movwf hours movlw .1 movwf day - movlw .8 + movlw .1 movwf month - movlw .10 + movlw .11 movwf year bsf PIE1, TMR1IE return \ No newline at end of file diff -r e5f1cfec8113 -r 17de42ab02b6 code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jan 12 14:38:24 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Thu Jan 13 09:05:45 2011 +0100 @@ -604,7 +604,7 @@ #DEFINE toggle_customview flag13,7 ;=1: Next customview #DEFINE enter_error_sleep flag14,0 ;=1: Sleep immediately displaying the error using LED codes -;unused flag14,1 ;=1: +#DEFINE nsm flag14,1 ;=1: Do not sleep #DEFINE is_bailout flag14,2 ;=1: CC mode, but bailout active! #DEFINE standalone_simulator flag14,3 ;=1: Standalone Simulator active #DEFINE display_set_simulator flag14,4 ;=1: Show Divemode simulator menu diff -r e5f1cfec8113 -r 17de42ab02b6 code_part1/OSTC_code_asm_part1/sleepmode.asm --- a/code_part1/OSTC_code_asm_part1/sleepmode.asm Wed Jan 12 14:38:24 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/sleepmode.asm Thu Jan 13 09:05:45 2011 +0100 @@ -51,6 +51,7 @@ btfss sleepmode ; wake up? (This bit will be set in other routines) goto restart ; yes nop + btfss nsm sleep ; Sleep until Timer1 will wake up the device nop bra sleeploop_loop ; do loop until someting happens diff -r e5f1cfec8113 -r 17de42ab02b6 code_part1/OSTC_code_asm_part1/start.asm --- a/code_part1/OSTC_code_asm_part1/start.asm Wed Jan 12 14:38:24 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/start.asm Thu Jan 13 09:05:45 2011 +0100 @@ -133,9 +133,6 @@ GETCUSTOM8 d'48' ; time correction value movff WREG, time_correction_value ; store in Bank0 register - GETCUSTOM8 d'63' ; OLED flip_screen flag(s). - movff WREG,win_flags ; store in Bank0 register - clrf flag1 ; clear all flags clrf flag2 clrf flag3 @@ -151,6 +148,19 @@ clrf flag13 clrf flag14 clrf flag15 + + bsf flag1,0 + clrf EEADRH ; Reset EEADRH + read_int_eeprom d'1' + movlw .7 + cpfsgt EEDATA ; >2048? + bcf flag1,0 + movff flag1,win_flags ; store in Bank0 register + clrf flag1 ; Clear flag1 (again) + movlw .39 + cpfslt EEDATA ; >10000 + bsf nsm ; For hardware debugging + call gassetup_sort_gaslist ; Sorts Gaslist according to change depth call PLED_boot ; PLED boot (Incl. Clear Screen!) WIN_TOP .0