# HG changeset patch # User heinrichsweikamp # Date 1341433267 -7200 # Node ID c3336f944e5314a734b31fce3288b0243d4c39a6 # Parent f8239a6279b814bdc147c5be5774a97703d211b7 reset CFIII properly diff -r f8239a6279b8 -r c3336f944e53 code_part1/OSTC_code_asm_part1/adc_rtc.asm --- a/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Jul 04 11:08:27 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Jul 04 22:21:07 2012 +0200 @@ -237,9 +237,9 @@ movwf mins movlw .12 movwf hours - movlw .7 + movlw .4 movwf day - movlw .5 + movlw .7 movwf month movlw .12 movwf year diff -r f8239a6279b8 -r c3336f944e53 code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jul 04 11:08:27 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jul 04 22:21:07 2012 +0200 @@ -29,13 +29,13 @@ #DEFINE max_custom_number d'65' ; Number of last used custom function ; International extension. Selecting messages source: -;#DEFINE ENGLISH ; Use english_text.asm +#DEFINE ENGLISH ; Use english_text.asm ;#DEFINE FRENCH ; Use french_text.asm ;#DEFINE GERMAN ; Use german_text.asm ;#DEFINE SPANISH ; Use spanish_text.asm ;#DEFINE RUSSIAN ; Use russian_text.asm ;#DEFINE TURKISH ; Use turkish_text.asm -#DEFINE ITALIAN ; Use italian_text.asm +;#DEFINE ITALIAN ; Use italian_text.asm ;#DEFINE DISPLAY_TEST ; Enables Display-Test in RAW data menu diff -r f8239a6279b8 -r c3336f944e53 code_part1/OSTC_code_asm_part1/menu_reset.asm --- a/code_part1/OSTC_code_asm_part1/menu_reset.asm Wed Jul 04 11:08:27 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm Wed Jul 04 22:21:07 2012 +0200 @@ -408,8 +408,8 @@ clrf nofly_time+0 ; Clear nofly time clrf nofly_time+1 ; Clear nofly time -reset_all_cf_bank0: - clrf EEADRH +reset_all_cf_bank0: + clrf EEADRH ; EEPROM BANK 0 movlw d'127' ; address of low byte of first custom function movwf EEADR @@ -458,8 +458,6 @@ cf_bank2_end: clrf EEADRH ; EEPROM BANK 0 - -;call reset_external_eeprom ; delete profile memory return reset_gases: diff -r f8239a6279b8 -r c3336f944e53 code_part1/OSTC_code_asm_part1/start.asm --- a/code_part1/OSTC_code_asm_part1/start.asm Wed Jul 04 11:08:27 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/start.asm Wed Jul 04 22:21:07 2012 +0200 @@ -241,18 +241,23 @@ read_int_eeprom d'92' ; Read number of CF used in this firmware movlw max_custom_number ; Defined in definitions.asm cpfseq EEDATA ; Compare with last version - bra restart_01 ; New CF, show warning and store new number - bra restart_1 ; No new CF, continue with boot -restart_01: + bra restart1 ; New CF, show warning and store new number + bra restart2 ; No new CF, continue with boot + +restart1: +; Reset Bank2 if required + movlw max_custom_number + btfsc WREG,6 ; >63? + call reset_all_cf_bank2 +; Show info screen + call PLED_boot ; PLED boot (Incl. Clear Screen!) + rcall display_new_cf_installed; Show info screen ; Save new number of current CF count - call PLED_boot ; PLED boot (Incl. Clear Screen!) - rcall display_new_cf_installed; Show warning movlw max_custom_number ; Defined in definitions.asm movwf EEDATA write_int_eeprom d'92' ; Store number of CF used in this firmware -restart_1: - +restart2: ; Set Debug mode? read_int_eeprom d'39' bsf debug_mode