comparison code_part1/OSTC_code_asm_part1/start.asm @ 15:6d1177291d38

1.54beta rc1
author heinrichsweikamp
date Sun, 28 Mar 2010 10:24:49 +0200
parents 588a969a0cae
children 73014f788032
comparison
equal deleted inserted replaced
14:239cb2cdc0c9 15:6d1177291d38
123 goto reset_all_cf_bank1 ; resets all custom functions bank1 and jumps to "restart" 123 goto reset_all_cf_bank1 ; resets all custom functions bank1 and jumps to "restart"
124 124
125 restart: 125 restart:
126 call clear_LEDr 126 call clear_LEDr
127 call clear_LEDnofly ; all LEDs off 127 call clear_LEDnofly ; all LEDs off
128 call PLED_boot ; PLED boot (Incl. Clear Screen!) 128
129 WIN_TOP .0
130 WIN_LEFT .0
131 WIN_FONT FT_SMALL
132 WIN_INVERT .0 ; Init new Wordprocessor
133 movlw 0xFF
134 movwf oled1_temp
135 movff oled1_temp,win_color1
136 movlw 0xFF
137 movwf oled1_temp
138 movff oled1_temp,win_color2
139 call I2CReset ; Just in Case any I2C device blocks the Bus
140 movff last_surfpressure_30min+0,last_surfpressure+0 ; Use 30min old airpressure
141 movff last_surfpressure_30min+1,last_surfpressure+1 ; Use 30min old airpressure
142
143 ; Check if new CF were added in the last firmware version
144 clrf EEADRH
145 read_int_eeprom d'92' ; Read number of CF used in this firmware
146 movlw max_custom_number ; Defined in definitions.asm
147 cpfseq EEDATA ; Compare with last version
148 bra restart_01 ; New CF, show warning and store new number
149 bra restart_1 ; No new CF, continue with boot
150 restart_01:
151 ; Save new number of current CF count
152 rcall display_new_cf_installed; Show warning
153 movlw max_custom_number ; Defined in definitions.asm
154 movwf EEDATA
155 write_int_eeprom d'92' ; Store number of CF used in this firmware
156
157 restart_1:
158 btfss pressure_refresh ; Wait for pressure sensor...
159 bra restart_1 ; loop until pressure and temp stable
160
161 ; call startup_screen3 ;splash screen
162 ; GETCUSTOM15 .31
163 ; movlw LOW .666
164 ; cpfseq lo
165 ; bra restart_2 ; Not equal!
166 ; movlw HIGH .666
167 ; cpfseq hi
168 ; bra restart_2 ; Not equal!
169 ; bra restart_3 ; Skip screen....
170 ;
171 ;restart_2:
172 ; btfsc show_startup_screen ; Show start screen?
173 ; call startup_screen1 ;1/2
174 ; btfsc show_startup_screen ; Show start screen?
175 ; call startup_screen2 ;2/2
176 ;
177 ;restart_3:
178 clrf flag1 ; clear all flags 129 clrf flag1 ; clear all flags
179 clrf flag2 130 clrf flag2
180 clrf flag3 131 clrf flag3
181 clrf flag4 132 clrf flag4
182 clrf flag5 133 clrf flag5
189 clrf flag12 140 clrf flag12
190 clrf flag13 141 clrf flag13
191 clrf flag14 142 clrf flag14
192 clrf flag15 143 clrf flag15
193 144
145 call PLED_boot ; PLED boot (Incl. Clear Screen!)
146 WIN_TOP .0
147 WIN_LEFT .0
148 WIN_FONT FT_SMALL
149 WIN_INVERT .0 ; Init new Wordprocessor
150 movlw 0xFF
151 movwf oled1_temp
152 movff oled1_temp,win_color1
153 movlw 0xFF
154 movwf oled1_temp
155 movff oled1_temp,win_color2
156 call I2CReset ; Just in Case any I2C device blocks the Bus
157 movff last_surfpressure_30min+0,last_surfpressure+0 ; Use 30min old airpressure
158 movff last_surfpressure_30min+1,last_surfpressure+1 ; Use 30min old airpressure
159
160 ; Check if new CF were added in the last firmware version
161 clrf EEADRH
162 read_int_eeprom d'92' ; Read number of CF used in this firmware
163 movlw max_custom_number ; Defined in definitions.asm
164 cpfseq EEDATA ; Compare with last version
165 bra restart_01 ; New CF, show warning and store new number
166 bra restart_1 ; No new CF, continue with boot
167 restart_01:
168 ; Save new number of current CF count
169 rcall display_new_cf_installed; Show warning
170 movlw max_custom_number ; Defined in definitions.asm
171 movwf EEDATA
172 write_int_eeprom d'92' ; Store number of CF used in this firmware
173
174 restart_1:
175 ; btfss pressure_refresh ; Wait for pressure sensor...
176 ; bra restart_1 ; loop until pressure and temp stable
177 ;
178
194 ; Set Debug mode? 179 ; Set Debug mode?
195 read_int_eeprom d'39' 180 read_int_eeprom d'39'
196 bsf debug_mode 181 bsf debug_mode
197 movlw d'1' 182 movlw d'1'
198 cpfseq EEDATA 183 cpfseq EEDATA