|
WITH DALLAS
TIMEKEEPING RAM
by Bruce
Renyolds
Start
ý Clock Operation ý Donýt
Need 32 KB? ý Replacing EPROMs ý Sources
and PDF
CLOCK OPERATION
The clock registers reside at the top
eight RAM locations 7FF8ý7FFF and are accessed using the control register,
as shown in Figure 1. Most designers will appreciate this approach
because it requires no programming wizardry or additional circuitry
to gain access to date and time information.
Date and time information is stored in
BCD format for year, month, date, day, hours, minutes, and seconds.
The internal clock register structure is double-buffered to prevent
reading incorrect data during clock update cycles.
Setting bit 6 at location 7FF8 to a logic
1 (the Read bit) halts updates to the internal clock registers and
enables the program to read the date and time information. Clock accuracy
is guaranteed to be within ý1 min./mo. at 25ý C.
DATE/TIME REGISTERS
Accessing the internal clock registers
is simple and straightforward. Listing 1 is a sample of 8051 assembly
code to demonstrate clock-access methods.
| Listing
1ýThis sample 8051-assembly code demonstrates clock access
methods. |
To begin using the clock functions, call
subroutine START_OSC to fire up the internal oscillator and
start the clock ticking.
Calling subroutine STOP_OSC can
be used to increase the shelf life and minimize current drain on the
internal lithium battery. However, stopping the internal oscillator
cancels clock register updates. This option is useful if you need
to remove the device from the application circuit for storage.
POWERCAP MODULE BOARD
For applications requiring a low-profile
version of the DS1644, Dallas offers the DS1644P powercap module board
that mates with the DS9034PCX (powercap). The DS1644P is a surface-mount
package that connects directly to the powercap containing the battery
and crystal, as illustrated in Figure 3.
|
|
| Figure 3ýFor stackable controllers,
or just to save space on a new design the DS1644P 34-pin low
profile powercap module board offers an alternate design solution.
This package fits into a standard 68-pin PLCC surface mountable
socket and is functionally equivalent to the DS1644 DIP. |
The powercap module in Figure 4 mounts
on top of the DS1644P after the ý1644P is soldered in place. This
setup prevents damage to the crystal and battery inside the DS9034PCX
from the high temperatures during the solder reflow process of the
ý1644P. The powercap is also keyed to prevent it from being attached
to the top of the ý1644P in reverse order.
|
|
| Figure 4ýThe DS9034PCX powercap
modules contain the lithium energy cell and clock crystal that
simply snap over the top of the DS1644P. |
Although the DS1644P offers a reduced
profile, with a guaranteed clock accuracy of ý1.53 min./mo. at 25ý
C, its accuracy is slightly lower than the DS1644 DIP.
With this setup, replacing the battery
would only be a matter of popping off the ý9034PCX. Of course, manufacturers
can ship the ý9034PCX module unattached to preserve battery life until
installation in the target system.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information
for engineers. Visit www.circuitcellar.com
for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe
online. ýCircuit Cellar, the Magazine for Computer Applications.
Posted with permission.
|