Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/start.asm @ 605:c3336f944e53
reset CFIII properly
author | heinrichsweikamp |
---|---|
date | Wed, 04 Jul 2012 22:21:07 +0200 |
parents | 16f4eafc197e |
children | f87205426add |
comparison
equal
deleted
inserted
replaced
604:f8239a6279b8 | 605:c3336f944e53 |
---|---|
239 ; Check if new CF were added in the last firmware version | 239 ; Check if new CF were added in the last firmware version |
240 clrf EEADRH | 240 clrf EEADRH |
241 read_int_eeprom d'92' ; Read number of CF used in this firmware | 241 read_int_eeprom d'92' ; Read number of CF used in this firmware |
242 movlw max_custom_number ; Defined in definitions.asm | 242 movlw max_custom_number ; Defined in definitions.asm |
243 cpfseq EEDATA ; Compare with last version | 243 cpfseq EEDATA ; Compare with last version |
244 bra restart_01 ; New CF, show warning and store new number | 244 bra restart1 ; New CF, show warning and store new number |
245 bra restart_1 ; No new CF, continue with boot | 245 bra restart2 ; No new CF, continue with boot |
246 restart_01: | 246 |
247 restart1: | |
248 ; Reset Bank2 if required | |
249 movlw max_custom_number | |
250 btfsc WREG,6 ; >63? | |
251 call reset_all_cf_bank2 | |
252 ; Show info screen | |
253 call PLED_boot ; PLED boot (Incl. Clear Screen!) | |
254 rcall display_new_cf_installed; Show info screen | |
247 ; Save new number of current CF count | 255 ; Save new number of current CF count |
248 call PLED_boot ; PLED boot (Incl. Clear Screen!) | |
249 rcall display_new_cf_installed; Show warning | |
250 movlw max_custom_number ; Defined in definitions.asm | 256 movlw max_custom_number ; Defined in definitions.asm |
251 movwf EEDATA | 257 movwf EEDATA |
252 write_int_eeprom d'92' ; Store number of CF used in this firmware | 258 write_int_eeprom d'92' ; Store number of CF used in this firmware |
253 | 259 |
254 restart_1: | 260 restart2: |
255 | |
256 ; Set Debug mode? | 261 ; Set Debug mode? |
257 read_int_eeprom d'39' | 262 read_int_eeprom d'39' |
258 bsf debug_mode | 263 bsf debug_mode |
259 movlw d'1' | 264 movlw d'1' |
260 cpfseq EEDATA | 265 cpfseq EEDATA |