comparison code_part1/OSTC_code_asm_part1/start.asm @ 390:a847f416e67e 64kByte Logbook

Debugging timer1
author heinrichsweikamp
date Sun, 19 Jun 2011 14:20:19 +0200
parents 904863f96582
children 8e272339fb68
comparison
equal deleted inserted replaced
389:a59532d2daf8 390:a847f416e67e
129 call write_eeprom ; write version y 129 call write_eeprom ; write version y
130 clrf EEADRH ; Reset EEADRH 130 clrf EEADRH ; Reset EEADRH
131 ; goto reset_all_cf ; resets all custom functions bank0 and bank1 and jumps to "restart" 131 ; goto reset_all_cf ; resets all custom functions bank0 and bank1 and jumps to "restart"
132 132
133 restart: 133 restart:
134 movlw b'00000011'
135 movwf T3CON ; Timer3 with 32768Hz clock running
136 clrf TMR3L
137 clrf TMR3H
134 bcf LED_red 138 bcf LED_red
135 bcf LED_blue ; all LEDs off 139 bcf LED_blue ; all LEDs off
136 GETCUSTOM8 d'48' ; time correction value 140 GETCUSTOM8 d'48' ; time correction value
137 movff WREG, time_correction_value ; store in Bank0 register 141 movff WREG, time_correction_value ; store in Bank0 register
138 142
175 call sub16 ; sub_c = sub_a - sub_b 179 call sub16 ; sub_c = sub_a - sub_b
176 btfss neg_flag ; Result negative (Ambient>880mBar)? 180 btfss neg_flag ; Result negative (Ambient>880mBar)?
177 bsf high_altitude_mode ; No, Set Flag! 181 bsf high_altitude_mode ; No, Set Flag!
178 182
179 ; Should we disable sleep (hardware emulator) 183 ; Should we disable sleep (hardware emulator)
180 movlw .0 184 restart_loop:
181 cpfsgt EEDATA ; >256 185 btfss 0xF81,0,A
186 bra restart_loop
187 btfss 0xF81,1,A
188 bra restart_loop
189 movlw 0x80
190 cpfslt 0xFB3,A
182 bsf nsm ; NO-SLEEP-MODE : for hardware debugging 191 bsf nsm ; NO-SLEEP-MODE : for hardware debugging
183 192
184 call gassetup_sort_gaslist ; Sorts Gaslist according to change depth 193 call gassetup_sort_gaslist ; Sorts Gaslist according to change depth
185 WIN_TOP .0 194 WIN_TOP .0
186 WIN_LEFT .0 195 WIN_LEFT .0