Manual
Copyright © Dr Robot Inc. 2008
40
V. Power Controller API
V.1. short GetVolRef( )
Description:
GetVolRef returns the power controller AD reference voltage (AD value)
Syntax: ival = GetVolRef ();
Parameter: void
Return value: short ival
Remarks;
The AD reference Voltage
Vref = ((ival / 4095) * 3.0 ) * 2
V.2. short GetBat1Vol( )
Description:
GetBat1Vol returns the battery1 voltage (AD value)
Syntax: ival = GetBat1Vol ();
Parameter: void
Return value: short ival
Remarks:
The Battery1 voltage
VBat1 = (ival /4095 *Vref ) * 8
V.3. short GetBat1Temp( )
Description:
GetBat1Temp returns the battery1 temperature sensor (AD value)
Syntax: ival = GetBat1Temp ();
Parameter: void
Return value: short ival
The value must be in the range of 1100 – 2500, if beyond this range, stop charging the
battery
V.4. short GetBat2Vol( )
Description:
GetBat2Vol returns the battery2 voltage (AD value)
Syntax: ival = GetBat2Vol ();
Parameter: void
Return value: short ival
Remarks:
The Battery2 voltage
VBat2 = (ival /4095 *Vref ) * 8










