Mercurial > public > hwos_code
diff src/adc_lightsensor.asm @ 207:f5d909e03f52
charge indicator on surface screen
author | heinrichsweikamp |
---|---|
date | Sat, 06 Dec 2014 21:04:27 +0100 |
parents | 93085f540746 |
children | 8fbd8c5ac51f |
line wrap: on
line diff
--- a/src/adc_lightsensor.asm Mon Dec 01 17:06:53 2014 +0100 +++ b/src/adc_lightsensor.asm Sat Dec 06 21:04:27 2014 +0100 @@ -32,12 +32,14 @@ call lt2942_get_accumulated_charge call lt2942_get_voltage + bcf cv_active + bcf cc_active bcf LEDr bcf TRISJ,2 ; Chrg-Out output bsf CHRG_OUT btfss CHRG_IN - bra cc_active + bra charge_cc_active bcf CHRG_OUT bsf TRISJ,2 ; Chrg-Out high impedance @@ -47,13 +49,16 @@ btfsc CHRG_IN return ;cv_active: + bsf cc_active + bsf cv_active bsf LEDr ; Indicate charging call lt2942_charge_done ; Reset accumulating registers to 0xFFFF WAITMS d'10' bcf LEDr ; Indicate charging return -cc_active: +charge_cc_active: + bsf cc_active bsf LEDr ; Indicate charging bcf CHRG_OUT bsf TRISJ,2 ; Chrg-Out high impedance