391
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Details
Some platforms include a set of convenient date and time conversion functions
that can be used to transform "elapsed time" values into current weekday, date,
and time (see
,
,
).
When the RTC is powered up after being off (that is, device had not
power AND no backup power for a period of time), it may not work
correctly until you set it using
method. Incorrect behavior
may include failure to increment or incrementing at an abnormal rate.
Rtc.running cannot be used to reliably check RTC state in this situation.
It is not necessary to use rtc.set if the backup power was present while
the device was off.
With Tibbo Basic release
V2
, this method had to be renamed from .get
to .getdata. This is because the period (".") separating "rtc" from
"getdata" is now a "true" part of the language, i.e. it is recognized as a
syntax unit, not just part of identifier. Hence, Tibbo Basic sees "rtc"
and "get" as separate entities and "get" is a reserved word that can't
be used.
8.3.11.2
.Running R/O Property
Function:
Returns current RTC state.
Type:
Enum (no_yes, byte)
Value Range:
0- NO: RTC is not running.
1- YES: RTC is running.
See Also:
Details
When this property returns 0- NO this typically is the sign of a hardware
malfunction (for instance, RTC crystal failure).
When the RTC is powered up after being off (that is, device had not
power AND no backup power for a period of time), it may not work
correctly until you set it using
method. Rtc.running cannot be
used to reliably check RTC state in this situation.
8.3.11.3
.Setdata Method (Previously .Set)
Function:
Presets the RTC with a number of elapsed days ,
minutes , and seconds.
Syntax:
rtc.setdata(daycount as word, mincount as word,
seconds as byte)
211
211
204
191
195
203
391
389
391