mainlogo.jpg (16286 bytes)

AN500

Product: Domino 2

Using a back-up battery for Domino 2’s Real Time Clock/calendar

 

Date: 11/17/1998

 

Introduction: DOMINO 2 incorporates a coprocessor for additional I/O capabilities. Another added function is a real-time clock/calendar (RTC). The RTC feature of the Domino 2 is available through firmware within the coprocessor.

 

Background: A 32khz low power oscillator provides a time base for the coprocessor to keep track of hours, minutes, seconds, month, day, day of the week, and year while the system is powered. To prevent the Domino 2 from losing time and date during power interuption, a dedicated external power pin is provided for battery backup.

 

How it works: Pin 2 is Vbat. Powering this input allows the real-time clock/calendar to continue even while the system power is off. Voltage applied to this pin is determined by the coprocessor’s minimum operating voltage. Older Domino 2’s required a minimum of 4.5 volts and a maximum of 4.9 volts. Domino 2’s manufactured with the date codes of 9840 and later require a minimum of 3 volts. All Domino 2’s can still be battery backed with using the same voltage as the older Domino 2. A 3-volt lithium battery makes a great source for the newer Domino 2’s because it is capable of a high plateau voltage for most of its life. Power required for RTC backup is in the low micro-amp range.

Engineering Change: Occasionally the Domino 2 would experience difficulty in resetting the coprocessor properly during a brief cycling of the power. To correct this problem Micromint has made an engineering change to the Domino 2 that allows the user the option of a faster reset on the coprocessor. U1 on the schematic demonstrates this. To battery back up the clock a 1N914 or equivalent diode must be placed externally on the Vbat line (U2 on the schematic). This only applies to Domino 2's with the date code of 9944 or later.

Since the coprocessor is powered from Vbat, it continues to execute code waking up once a second from sleep. Since it remains active, any external device driven from any of the coprocessor’s outputs will continue to draw power from the coprocessor. This will be extra drain on your battery and discharge it faster than you may have estimated. The easiest way to prevent this from happening is to configure all of the coprocessor’s ports to inputs before shutting down the system power. Domino 2’s with version 3 of the coprocessor, sets the outputs to inputs during power down. The following program demonstrates how to read the coprocessors version number. This will require that every device connected to the coprocessor be in a safe state when the port is configured as an input. Think about this, as safety should be a number one concern.

Should Vbat ever be allowed to run down to the point where the RTC can no longer execute properly, system power may be unable to restart the coprocessor without fully removing all voltage sources from the Domino 2. Remember since the coprocessor will run on very little current, any powered external devices connected to an I/O pin may keep the coprocessor running, but in an unknown state. You will know this is the case, because your BASIC program will execute properly until it tries making contact with the coprocessor and fails.

 

 

Program Listing:

10 PUSH 207FH

20 CALL 0F12CH

30 POP C

40 PRINT C