English
Language : 

BQ4285_14 Datasheet, PDF (5/29 Pages) Texas Instruments – Real-Time Clock (RTC) With NVRAM Control
bq4285
Programming the RTC
The time-of-day, alarm, and calendar bytes can be writ-
ten in either the BCD or binary format (see Table 2).
These steps may be followed to program the time, alarm,
and calendar:
1. Modify the contents of register B:
a. Write a 1 to the UTI bit to prevent trans-
fers between RTC bytes and user buffer.
b. Write the appropriate value to the data
format (DF) bit to select BCD or binary
format for all time, alarm, and calendar
bytes.
c. Write the appropriate value to the hour
format (HF) bit.
2. Write new values to all the time, alarm, and
calendar locations.
3. Clear the UTI bit to allow update transfers.
On the next update cycle, the RTC updates all 10 bytes
in the selected format.
Table 2. Time, Alarm, and Calendar Formats
Range
Address
0
1
2
3
4
RTC Bytes
Seconds
Seconds alarm
Minutes
Minutes alarm
Hours, 12-hour format
Decimal
0–59
0–59
0–59
0–59
1–12
Hours, 24-hour format
0–23
5
Hours alarm, 12-hour format
1–12
Hours alarm, 24-hour format
0–23
6
Day of week (1=Sunday)
1–7
7
Day of month
1–31
8
Month
1–12
9
Year
0–99
Binary
00H–3BH
00H–3BH
00H–3BH
00H–3BH
01H–OCH AM;
81H–8CH PM
00H–17H
01H–OCH AM;
81H–8CH PM
00H–17H
01H–07H
01H–1FH
01H–0CH
00H–63H
Binary-Coded
Decimal
00H–59H
00H–59H
00H–59H
00H–59H
01H–12H AM;
81H–92H PM
00H–23H
01H–12H AM;
81H–92H PM
00H–23H
01H–07H
01H–31H
01H–12H
00H–99H
5