comparison src/adc_lightsensor.asm @ 201:82faedf8fd58

lower minimum backlight in eco mode
author heinrichsweikamp
date Thu, 20 Nov 2014 20:32:36 +0100
parents dcd513840c6c
children dd9b167e82dc
comparison
equal deleted inserted replaced
200:dcd513840c6c 201:82faedf8fd58
263 263
264 movlw .254 264 movlw .254
265 movwf ambient_light+0 ; avoid ADC clipping 265 movwf ambient_light+0 ; avoid ADC clipping
266 266
267 get_ambient_level2: 267 get_ambient_level2:
268 movlw .10
269 subwf ambient_light+0,F ; Subtract 10 (ADC Offset)
270 btfsc STATUS,N
271 movwf ambient_light+0 ; avoid clipping
272
273
268 banksel isr_backup ; Back to Bank0 ISR data 274 banksel isr_backup ; Back to Bank0 ISR data
269 movff opt_brightness,isr1_temp 275 movff opt_brightness,isr1_temp
270 276
271 btfsc RCSTA1,7 ; UART module on? 277 btfsc RCSTA1,7 ; UART module on?
272 clrf isr1_temp ; Yes, set temporally to eco mode 278 clrf isr1_temp ; Yes, set temporally to eco mode