Real-Time Counter
The real-time counter (RTC) of the EM1000 is a free-running 40-bit register that increments at a rate of 128Hz.
As a source of backup power, the EM1000 can rely on a supercapacitor. Option "-S" of the EM1000 (see Specifications and Ordering Info) has this onboard supercapacitor. To enable charging, connect 3.3V power to the VCCB pin, preferably through a current-limiting resistor (50Ω is a good value). A fully discharged supercapacitor creates a nearly short-circuit current inrush when it starts charging, which can damage the power supply of the host board.
The -S carries the supercapacitor on the bottom side of its PCB (see Mechanical Dimensions). With this supercapacitor present, it is impossible to solder the module into the host PCB directly and the module can only be installed on a socket. If this is not acceptable, you can use a "plain" EM1000 (non- "-S") and connect an external supercapacitor to the SCAP pin. This option is only available on the newer -01/-02 devices (-00 does not have the SCAP input).
The supercapacitor has many advantages — it charges almost instantly and has virtually unlimited lifespan. The disadvantage is that the supercapacitor is only able to sustain the RTC of the EM1000 for several days at most (about six days for the 4F supercapacitor of the -S), which may appear to be insufficient. Remember, however, that the EM1000 is usually connected to the network and can always synchronize its clock* with an Internet time server or a master clock on the main server of your system. Therefore, the role of the supercapacitor is to provide backup power during relatively short periods of power interruption (e.g., when the device is unplugged and moved to another location, or when the device is powered off over the weekend).
It is also possible to use a 3V lithium battery to power the RTC (in this case, do not use the "-S"). Connect the battery to the VCCB pin through a small Schottky diode. This diode is necessary to slightly reduce the voltage on the VCCB pin. You can calculate the time the battery will be able to sustain the EM1000 from the average backup current, which is ~13µA. Note that the VCCB pin consumes a much larger current (~1mA) when Vcc is applied and the EM1000 is running. Therefore, your battery-based backup circuit should be designed in a way that does not drain the battery while the Vcc is applied.
The RTC will continue to function with backup power on the VCCB pin as low as 2.2V. Make sure that the voltage on this pin does not exceed 3.3V. Failure to observe this limit may cause permanent damage to the EM1000.
Your Tibbo BASIC/C application can access the RTC through the rtc. object.
*With the right application, that is.