Mercurial > public > mk2
changeset 605:c3336f944e53
reset CFIII properly
author | heinrichsweikamp |
---|---|
date | Wed, 04 Jul 2012 22:21:07 +0200 (2012-07-04) |
parents | f8239a6279b8 |
children | 4f43aee67da0 |
files | code_part1/OSTC_code_asm_part1/adc_rtc.asm code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/start.asm |
diffstat | 4 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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:
--- 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