comparison src/sleepmode.asm @ 50:ec4d8503ec45

NEW: user-selectable color schemes
author heinrichsweikamp
date Fri, 27 Sep 2013 23:45:57 +0200
parents e4e91fe8b09d
children e2f04bb2539c
comparison
equal deleted inserted replaced
49:fe01bbaf6014 50:ec4d8503ec45
174 call get_temperature_value ; State 1: Get temperature 174 call get_temperature_value ; State 1: Get temperature
175 call get_pressure_start ; Start pressure integration. 175 call get_pressure_start ; Start pressure integration.
176 banksel common 176 banksel common
177 rcall sleepmode_sleep ; Wait at least 35ms (every 62,5ms Timer7 wakeup) 177 rcall sleepmode_sleep ; Wait at least 35ms (every 62,5ms Timer7 wakeup)
178 rcall sleepmode_sleep ; Wait at least 35ms (every 62,5ms Timer7 wakeup) 178 rcall sleepmode_sleep ; Wait at least 35ms (every 62,5ms Timer7 wakeup)
179 bsf LEDg ; Show some activity
179 banksel isr_backup ; Back to Bank0 ISR data 180 banksel isr_backup ; Back to Bank0 ISR data
180 call get_pressure_value ; State2: Get pressure (51us) 181 call get_pressure_value ; State2: Get pressure (51us)
181 call calculate_compensation ; calculate temperature compensated pressure (27us) 182 call calculate_compensation ; calculate temperature compensated pressure (27us)
182 banksel common 183 banksel common
183 SAFE_2BYTE_COPY amb_pressure_avg, amb_pressure ; copy for compatibility 184 SAFE_2BYTE_COPY amb_pressure_avg, amb_pressure ; copy for compatibility
185 bcf LEDg
184 return 186 return
185 187
186 sleepmode_sleep: 188 sleepmode_sleep:
187 banksel 0xF16 ; Addresses, F16h through F5Fh, are also used by SFRs, but are not part of the Access RAM. 189 banksel 0xF16 ; Addresses, F16h through F5Fh, are also used by SFRs, but are not part of the Access RAM.
188 clrf T7GCON ; Reset Timer7 Gate Control register 190 clrf T7GCON ; Reset Timer7 Gate Control register