Monday, January 16, 2012

The simple way to connect to the M41T81S Real-time Clock chip

The M41T81S real time clock (RTC) from STMicroelectronics is a robust cheap, low-power 8-pin device that electronics designers can employ to maintain details of time and perform timing functions in their projects. Lots of ST’s designs require a battery back-up to keep the clock running during power down and maintain their information when the key power supply is off or at a low voltage level.

The device has a built-in power sense circuit which can automatically switch over to the back-up supply when a low power level or no power is connected. This device can operate routinely with a supply voltage of 2.0 to 5.CR Lithium battery5 V and only needs around 0.6 uA (at 3 V) of back-up battery supply current. A single tiny lithium button cell can be employed as the back-up source, though another convenient way of providing back-up power would be through a special chargeable capacitor like a Super Cap. Using one of those could make a circuit maintenance-free as problems with battery replacement and disposal are eliminated. Nonetheless a Super Cap would only work with short breaks in the power supply (on the order of days).

The chip uses an I2C serial interface for two-way information transfer at 400 kHz. The device is selected by the microcontroller with the address D0h,scale balance which initiates the data exchange. Then a byte from the inbuilt SRAM is selected along with the read/write command. A built-in address register is incremented immediately after each WRITE or READ data bit, so the subsequent SRAM byte selection is optional. If the M41T81S senses a low voltage condition, it’ll cancel any data transfer in progress and reset the device address counter to prevent erroneous info from being transferred.

There are eight bytes of SRAM reserved for the clock/calendar function and twelve bytes of SRAM are used for status/control of the alarm, watchdog and square wave functions.tdrforce The eight clock address locations can record from hundredths of a second up to centuries. There’s a special clock calibration routine built into the device which can compensate for crystal deviation due to temperature. The operating temperature range is specified from -40 C to +85 C.

No comments:

Post a Comment