23 June 2005
HE104MAN-V8 Manual
Tri-M Engineering
Tel:
800.665.5600, 604.945.9565
1407 Kebet Way, Unit 100
Fax:
604.945.9566
Port Coquitlam, BC V3C 6L3
E-mail:
info@tri-m.com
Canada
Web site:
www.tri-m.com
30
Let Bat1_chrg = 0
Main_Batt1:
Low PSU_OnOff
‘Just making sure PSU stays on!
If Bat1_Chrg = 1 then Batt_Trickle
‘is battery already charged?
Goto Bat_Chrg
Batt_Trickle:
‘debug “trickle”
gosub Chk_Pwr
let D1 = 0
let D0 =0
gosub Convert
‘Get battery charging voltage
let Batt_V =AD
PWM Chrg_Limit, Trickle_LVL, 1000
‘Turn on Trickle current
Low Chrg_Limit
‘Trickle to minimum current
Goto Main_Batt1
Chk_Pwr:
Let D1 = 1
Let D0 = 0
Gosub Convert
‘debug AD, Batt_V
‘Get battery charging voltage
if AD < Batt_V then No_ Power
return
No_Power:
‘debug “no_pwr”
pause 50
let Bat1_Chrg = 0
‘Indicate battery has been discharged
PWM Chrg_Limit, 0.50
‘turn off charge current
Goto Main_Batt1
Battery Charger Program
Batt_Chrg:
Let Chrg_Time = 0
‘Initialize charge timer (counts in sec.)
Chrg_Lp:
Gosub Chk_Pwr
For TCnt= 0 to 1
PWM Chrg_Limit,A01_LVL,1000
‘first apply charge current then
‘check for charge termination