User`s guide
Chapter
5
BASIC
Commands
95
Remarks
"A%" is an integer variable to be assigned to the result.
The voltage level of the backup battery is returned in units of milli-volt (mV). The
backup battery is used to backup the SRAM and keep the calendar chip running,
even when the power is off. The backup battery would be considered as "Battery
Low" when the BACK_BATTERY is lower than 2900 mV. That means the SRAM
and the calendar chip may lose their data at any time thereafter, if the battery is not
recharged or replaced.
Example
CheckBackupBattery:
IF BACKUP_BATTERY < BATTERY_LOW% THEN
BEEP(2000,30)
CLS
PRINT "Backup Battery needs to be replaced!"
Loop:
GOTO Loop
END IF
See Also
MAIN_BATTERY
MAIN_BATTERY
Purpose
To get the voltage level of the main battery.
Syntax
A% = MAIN_BATTERY
Remarks
"A%" is an integer variable to be assigned to the result.
The voltage level of the main battery is returned in units of milli-volt (mV). The
main battery is the power source for the system operation. The main battery would
be considered as "Battery Low" when the MAIN_BATTERY is lower than 2200
mV. That means the basic operations may still be running, but some functions that
consume high power may be disabled.
Example
BATTERY_LOW% = 2200
CheckMainBattery:
IF MAIN_BATTERY < BATTERY_LOW% THEN
BEEP(2000,30)
CLS
PRINT "Main Battery needs to be recharged!"
Loop:
GOTO Loop
END IF
See Also
BACKUP_BATTERY