 In_filter:
Dti = Adc_present - Adc_last ;test charging/discharging
If Dti < 0 Then              ; if neg. then exec. following code
Dti = Adc_last - Adc_present
Dti = Dti * 0.35             ; calibrate filter to secs
Dti = Dti / Fil_time         ; fil_time=cr time (adjustable)
Adc_last = Adc_last - Dti    ; form final output
Gosub Disp                   ; display it
Return                       
End If
Dti = Dti * 0.35             ; if discharging then go here
Dti = Dti / Fil_time
Adc_last = Adc_last + Dti
Gosub Disp
Return
