comparison code_part1/OSTC_code_asm_part1/adc_rtc.asm @ 729:71e88ee8bbf2

battery info updater
author heinrichsweikamp
date Sun, 16 Jun 2013 15:50:37 +0200
parents 6fd9a9feca91
children c50296c3059e
comparison
equal deleted inserted replaced
728:0ab7d244c6ec 729:71e88ee8bbf2
100 100
101 movlw LOW d'2000' ; must be greater then 2000mV... 101 movlw LOW d'2000' ; must be greater then 2000mV...
102 movwf sub_a+0 102 movwf sub_a+0
103 movlw HIGH d'2000' 103 movlw HIGH d'2000'
104 movwf sub_a+1 104 movwf sub_a+1
105 call subU16 ; sub_c = sub_a - sub_b 105 call subU16 ; sub_c = sub_a - sub_b
106 btfsc neg_flag ; neg_flag=1 if eeprom40:41 < 2000 106 btfss neg_flag ; neg_flag=1 if eeprom40:41 < 2000
107 bsf initialize_battery1 ; battery need to be initialised 107 bsf initialize_battery1 ; battery need to be initialised
108 108
109 movlw LOW d'4500' ; must be lower then 4500mV... 109 movlw LOW d'4500' ; must be lower then 4500mV...
110 movwf sub_a+0 110 movwf sub_a+0
111 movlw HIGH d'4500' 111 movlw HIGH d'4500'
112 movwf sub_a+1 112 movwf sub_a+1
113 call subU16 ; sub_c = sub_a - sub_b 113 call subU16 ; sub_c = sub_a - sub_b
114 btfss neg_flag ; neg_flag=1 if eeprom40:41 < 4500 114 btfsc neg_flag ; neg_flag=1 if eeprom40:41 < 4500
115 bsf initialize_battery1 ; battery need to be initialised 115 bsf initialize_battery1 ; battery need to be initialised
116 116
117 btfss initialize_battery1 ; battery need to be initialised? 117 btfss initialize_battery1 ; battery need to be initialised?
118 bra get_battery_no_init ; No, we have already valid values, just check for new extremas 118 bra get_battery_no_init ; No, we have already valid values, just check for new extremas
119 119