DS1221
072498 2/8
CONTROLLER /DECODER OPERATION
The DS1221 nonvolatile controller performs six circuit
functions required to decode and battery back up a bank
of up to four CMOS RAMs. First, a 2–to–4 decoder pro-
vides selection of one of four RAMs (see Figure 1). Sec-
ond, a switch is provided to direct power from the battery
or V
CCI
supply, depending on which is greater, to the
V
CCO
pin. This switch has a voltage drop of less than
0.2V. The third function which the nonvolatile controller
provides is power–fail detection. The DS1221 constant-
ly monitors the V
CCI
supply. When V
CCI
falls below 4.5
volts, a precision comparator detects the condition and
inhibits the RAM chip enables (CE0 through CE3). The
fourth function of write protection is accomplished by
holding all chip enable outputs (CE0 through CE3) to
within 0.2 volts of V
CCI
or battery supply. If the Chip En-
able Input (CE) is low at the time power–fail detection
occurs, the chip enable outputs are kept in their present
state until CE is driven high. The delay of write protec-
tion until the current memory cycle is completed pre-
vents the corruption of data. Power failure detection oc-
curs in the range of 4.5 to 4.25 volts. During nominal
supply conditions the chip enable outputs follow the log-
ic of a 2–to–4 decoder. The fifth function the DS1221
performs is to check battery status to warn of potential
data loss. Each time that V
CCI
power is restored the bat-
tery voltage is checked with a precision comparator. If
the connected battery voltage is less than 2 volts, the
second memory cycle is inhibited. Battery status can,
therefore, be determined by performing a read cycle af-
ter power–up to any location in memory, verifying that
memory location content. A subsequent write cycle can
then be executed to the same memory location, altering
the data. If the next read cycle fails to verify the written
data, the contents of the memories are questionable.
The sixth function of the nonvolatile controller provides
for battery redundancy. In many applications, data in-
tegrity is paramount. In these applications it is often de-
sirable to use two batteries to ensure reliability. The
DS1221 provides an internal isolation switch which pro-
vides for connection of two batteries. During battery
back–up operation the battery with the highest voltage
is selected for use. If one battery should fail, the other
will automatically take over. The switch between batter-
ies is transparent to the user. A battery status warning
will occur if both batteries are less than 2.0 volts. If only
one battery is used, the second battery input must be
grounded. Figure 2 illustrates the connections required
for the DS1221 in a typical application.
NONVOLATILE CONTROLLER/DECODER
Figure 1
INPUTS
OUTPUTS
V
CCI
CE
B
A
CE0
CE1
CE2
CE3
>=4.5
H
X
X
H
H
H
H
< 4.25
X
X
X
H
H
H
H
>=4.5
L
L
L
L
H
H
H
>=4.5
L
L
H
H
L
H
H
>=4.5
L
H
L
H
H
L
H
>=4.5
L
H
H
H
H
H
L
H = High Level
L = Low Level
X = Irrelevant