comparison code_part1/OSTC_code_asm_part1/sleepmode.asm @ 16:01510acaeb11

1.54 rc2
author heinrichsweikamp
date Sun, 28 Mar 2010 20:43:54 +0200
parents 96a35aeda5f2
children 1cdf96a7946f
comparison
equal deleted inserted replaced
15:6d1177291d38 16:01510acaeb11
57 57
58 58
59 onemin_sleep: 59 onemin_sleep:
60 call get_battery_voltage ; get battery voltage 60 call get_battery_voltage ; get battery voltage
61 btfsc enter_error_sleep ; Enter Fatal Error Routine? 61 btfsc enter_error_sleep ; Enter Fatal Error Routine?
62 goto fatal_error_sleep ; Yes (In Sleepmode_vxx.asm!) 62 call fatal_error_sleep ; Yes (In Sleepmode_vxx.asm!)
63 63
64 call calc_surface_interval ; Increases Surface-Interval time 64 call calc_surface_interval ; Increases Surface-Interval time
65 call nofly_timeout60 ; check for no fly time 65 call nofly_timeout60 ; check for no fly time
66 ; adjust airpressure compensation any 15 minutes 66 ; adjust airpressure compensation any 15 minutes
67 incf divemins+1,F ; counts to 14... 67 incf divemins+1,F ; counts to 14...
186 call get_pressure_value ; State2: Get pressure (51us) 186 call get_pressure_value ; State2: Get pressure (51us)
187 call calculate_compensation ; calculate temperature compensated pressure (233us) 187 call calculate_compensation ; calculate temperature compensated pressure (233us)
188 return 188 return
189 189
190 fatal_error_sleep: 190 fatal_error_sleep:
191 WAITMS d'250'
192 WAITMS d'250'
193 WAITMS d'250'
194 WAITMS d'250'
195 call get_battery_voltage ; get battery voltage
196 btfss enter_error_sleep ; REALLY enter Fatal Error Routine?
197 return ; No!
198
191 clrf INTCON 199 clrf INTCON
192 clrf INTCON2 200 clrf INTCON2
193 clrf INTCON3 201 clrf INTCON3
194 bcf ADCON0,0 ; AD converter off 202 bcf ADCON0,0 ; AD converter off
195 call disable_rs232 ; disable UART module 203 call disable_rs232 ; disable UART module