Real-time Counter

Top  Previous  Next

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 of the EM1000, preferably through a current-limiting resistor (50 Ohm is a good value). A fully discharged supercapacitor creates a nearly short-circuit current inrush when it starts charging and this can damage the power supply of the host board.

 

em1000_rtc_backup

 

The EM1000-...-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 of the EM1000. This option is only available on the newer EM1000-...- 01 device (EM1000-...- 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 6 days for the 4F supercapacitor of the EM1000-...-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 the backup power during relatively short periods of power interruption, i.e. 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 EM1000 with "-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 ~13uA. Note that the VCCB pin cosumes a much larger current (~1mA) when the 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 (rtc.) object, which is documented in the "TIDE and Tibbo BASIC Manual".

 

*With the right application, that is.