Write protect, Reading and writing the potentiometer values, Power monitor – Rainbow Electronics DS1846 User Manual
Page 8: Pushbutton reset, Non-maskable interrupt
DS1846
8 of 16
o
WRITE PROTECT
An external pin WP (write protect) protects EEPROM data and potentiometer position from alteration in
an application. This pin must be open or tied high to protect data from alteration.
READING AND WRITING THE POTENTIOMETER VALUES
Reading from and writing to the potentiometers consists of a standard read or write to EEPROM memory
at the addresses F8h, F9h and FAh. The 8-bit value at address F8h controls the wiper setting for
potentiometer 1, which has 256 positions. The 8-bit value at addresses F9h and FAh control the wiper
setting of potentiometer 0 and 2 respectively, each has 100 positions. Potentiometer 1 may be set to any
value between 00h and FFh. 00h sets the wiper of potentiometer 1 to its lowest value and FFh sets the
wiper to its highest. Potentiometer 0 or 2 may be set to any value between 00h and 63h. A value of 00h
sets the wiper of potentiometer 0 or 2 to its lowest position, and 63h sets the wiper to its highest position.
Any hexadecimal value is a valid address. Writing a value greater than 63h will set the potentiometer
according to the seven least significant bits and the MSB will be ignored.
Power Monitor
The DS1846 detects out-of-tolerance power supply conditions and warns a processor-based system of
impending power failure. When V
CC
falls below the minimum V
CC
tolerance, a comparator outputs the
RST and
RST
signals. RST and
RST
are excellent control signals for a microprocessor, as processing is
stopped at the last possible moment of valid V
CC
. On power-up, RST and
RST
are kept active for a
minimum of 130 ms to allow the power supply and processor to stabilize.
Pushbutton Reset
The DS1846 provides an input pin for direct connection to a pushbutton reset (see Figure 4). The
pushbutton reset input requires an active low signal. Internally, this input is debounced and timed such
that RST and
RST
signals of at least 130 ms minimum will be generated. The 130 ms delay commences
as the pushbutton reset input is released from the low level. The pushbutton can be initiated by
connecting the
NMI
output to the
PBRST
input as shown in Figure 5.
Non-Maskable Interrupt
The DS1846 generates a non-maskable interrupt (
NMI
) for early warning of a power failure. A precision
comparator monitors the voltage level at the IN pin relative to an on-chip reference generated by an
internal band gap. The IN pin is a high impedance input allowing for a user-defined sense point. An
external resistor voltage divider network (Figure 6) is used to interface with high voltage signals. This
sense point may be derived from a regulated supply or from a higher DC voltage level closer to the main
system power input. Since the IN trip point V
TP
is 1.25 volts, the proper values for R1 and R2 can be
determined by the equation as shown in Figure 6. Proper operation of the DS1846 requires that the
voltage at the IN pin be limited to V
CC
. Therefore, the maximum allowable voltage at the supply being
monitored (V
MAX
) can also be derived as shown in Figure 6. A simple approach to solving the equation is
to select a value for R2 high enough to keep power consumption low, and solve for R1. The flexibility of
the IN input pin allows for detection of power loss at the earliest point in a power supply system,
maximizing the amount of time for system shut-down between
NMI
and RST/
RST
.