Monday, 16 January 2012

Unique Content Article on

How to interface to the M41T81S Real Time Clock


by James H. Reinholm


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.5 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 has an in-built 32,768 Hz oscillator controlled by an external crystal, which is the only extra part needed for the oscillator. The chip has built-in load capacitors in the oscillator circuit (pins X0 and X1), so external load capacitors aren't needed, nor are external resistors.

The chip uses an I2C serial interface for two-way information transference at up to 400 kHz. The device is selected by the microcontroller with the address D0h, which initiates the data transfer. Then a byte from the built-in SRAM is selected together 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 perceives a low voltage condition, it'll end any information transfer in progress and reset the device address counter to prevent erroneous information 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. 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.




About the Author:





You are receiving this because you signed up for it on 2011-10-03 from IP 203.109.66.181


To fine-tune your selection of which articles to receive, just login here
using your username:


To unsubscribe please use the following link:

Unsubscribe



No comments:

Post a Comment