Hardware Reference
In-Depth Information
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 an AM/FM indicator. The DS1307 has a
built-in power-sense circuit that detects power failure and automatically switches to the battery
supply. The pin assignment and the block diagram of the DS1307 are shown in Figure 11.27.
×1
×2
Oscillator
and divider
RTC
Square
wave out
Control
logic
SQWOUT
X1
1
8
V
CC
RAM
(56x8)
V
CC
V
BAT
Power
control
X2
2
7
SQWOUT
DS1307
GND
V
BAT
3
6
SCL
SCL
Serial bus
interface
Address
register
GND
4
5
SDA
SDA
Figure 11.27
■
DS1307 pin assignment and block diagram
•
V
CC
, GND:
DC power input
.
V
CC
is the 15 V input. When a 5-V voltage is applied
to this pin, the device is fully accessible and data can be written and read. When a
3-V battery is connected to the
V
BAT
pin and
V
CC
input is below 1.25
V
BAT
, reads
and writes are inhibited. However, the timekeeping function continues unaffected
by the lower input voltage. As
V
CC
falls below
V
BAT
, the RAM and timekeeper are
switched over to the external power supply at
V
BAT
.
•
V
BAT
:
battery input
for any standard 3-V lithium cell or other energy source. Battery
voltage must be held between 2.0 and 3.5 V for proper operation. The nominal write-
protect trip-point voltage at which access to the RTC and user RAM is denied is set
by the internal circuitry as 1.25
×
V
BAT
nominal. A lithium battery with 48 mAh or
greater will back up DS1307 for more than 10 years in the absence of power at 25°C.
•
SCL: serial clock input.
•
SDA: serial data input/output.
•
SQWOUT:
square wave output driver
. When enabled (by setting the SQWE bit of
the control byte to 1), the SQWOUT pin output may be programmed to one of the
four square wave frequencies (1 Hz, 4 kHz, 8 kHz, and 32 kHz). The SQWOUT pin
is open drain and requires an external pull-up resistor. SQWOUT will operate with
either
V
CC
or
V
BAT
applied.
•
X1, X2:
crystal connection
. These two pins are used for connections to a standard
32,768-Hz quartz crystal.
×
Search WWH ::
Custom Search