Pin description, Detailed description – Rainbow Electronics DS1338 User Manual
Page 7

DS1338 I
2
C RTC with 56-Byte NV RAM
7 of 15
PIN DESCRIPTION
PIN
8 16
NAME FUNCTION
1 — X1
2 — X2
32.768kHz Crystal Connections. The internal oscillator circuitry is designed for
operation with a crystal having a specified load capacitance (C
L
) of 12.5pF. Pin
X1 is the input to the oscillator and can optionally be connected to an external
32.768kHz oscillator. The output of the internal oscillator, pin X2, is floated if an
external oscillator is connected to pin X1. An external 32.768kHz oscillator can
also drive the DS1338. In this configuration, the X1 pin is connected to the
external oscillator signal and the X2 pin is floated.
Note: For more information about crystal selection and crystal layout considerations,
refer to Application Note 58: Crystal Considerations with Dallas Real-Time Clocks.
3 14 V
BAT
+3V Battery Input. Backup supply input for any standard 3V lithium cell or other
energy source. Battery voltage must be held between the minimum and
maximum limits for proper operation. If a backup supply is not required, V
BAT
must be grounded. UL recognized to ensure against reverse charging when
used with a lithium battery.
4 15 GND
Ground. DC power is provided to the device on these pins. V
CC
is the primary
power input. When voltage is applied within normal limits, the device is fully
accessible and data can be written and read. When a backup supply is
connected to the device and V
CC
is below V
PF
, reads and writes are inhibited.
However, the timekeeping function continues unaffected by the lower input
voltage.
5 16 SDA
Serial Data. Input/output pin for the I
2
C serial interface. It is open drain and
requires an external pullup resistor.
6
1
SCL
Serial Clock. Used to synchronize data movement on the serial interface
7 2
SQW/OUT
Square-Wave/Output Driver. When enabled and the SQWE bit set to 1, the
SQW/OUT pin outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz,
32kHz). It is open drain and requires an external pullup resistor. Operates with
either V
CC
or V
BAT
applied.
8 3 V
CC
Primary Power Supply. When voltage is applied within normal limits, the device
is fully accessible and data can be written and read. When a backup supply is
connected to the device and V
CC
is below V
PF
, reads and writes are inhibited.
However, the timekeeping function continues unaffected by the lower input
voltage.
— 4–13 N.C.
No Connect. These pins are not connected internally, but must be grounded for
proper operation.
DETAILED DESCRIPTION
The DS1338 serial RTC is a low-power, full BCD clock/calendar plus 56 bytes of NV SRAM. Address and data are
transferred serially through an I
2
C interface. The clock/calendar provides seconds, minutes, hours, day, date,
month, and year information. The end of the month date is automatically adjusted for months with fewer than 31
days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM
indicator. The DS1338 has a built-in power-sense circuit that detects power failures and automatically switches to
the battery supply.