Real-Time Counter

The real-time counter (RTC) of the EM1206 is a free-running 40-bit register that increments at a rate of 128Hz.

As a source of backup power, the EM1206 can rely on a supercapacitor. The suggested schematic diagram is shown below. The resistor is used for current limiting: A fully discharged supercapacitor creates a nearly short-circuit current inrush when it starts charging, which can damage the power supply of your host board.

A circuit diagram illustrating how to connect a supercapacitor to the EM1000.

The supercapacitor has many advantages — it charges almost instantly and has a virtually unlimited lifespan. The disadvantage is that the supercapacitor is only able to sustain the RTC of the EM1206 for about five to six days, which may appear to be insufficient. Remember, however, that the EM1206 is a "connected" product. As such, it 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; for example, 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 for backup power. Remember, however, that the voltage on the VCCB pin should not exceeed 2.5V. Therefore, you need to use several diodes in series between the battery and the VCCB input. You can calculate the time the battery will be able to sustain the EM1206 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 EM1206 is running. Therefore, your battery-based backup circuit should be designed in a way that does not drain the battery while Vcc is applied.  

Your Tibbo BASIC/C application can access the RTC through the rtc. object.