bq3285LF
a. Write a 1 to the UTI bit to prevent trans-
mains unchanged, while the local copy of the same bytes
continues to be updated every second.
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.
The update-in-progress bit (UIP) in register A is set tBUC
time before the beginning of an update cycle (see Figure
2). This bit is cleared and the update-complete flag (UF)
is set at the end of the update cycle.
c.
Write the appropriate value to the hour
format (HF) bit.
Programming the RTC
2. Write new values to all the time, alarm, and
calendar locations.
The time-of-day, alarm, and calendar bytes can be writ-
ten in either the BCD or binary format (see Table 2).
3. The CENT bit in location 7Fh (bit 7) of the ex-
tended SRAM bank is read only. Writing year
in location 09h automatically updates CENT.
These steps may be followed to program the time, alarm,
and calendar:
4. Clear the UTI bit to allow update transfers.
1. Modify the contents of register B:
Table 2. Time, Alarm, Calendar, and Index Formats
Range
Binary-Coded
Decimal
Decimal
0–59
Binary
Address
RTC Bytes
0
1
2
3
Seconds
00H–3BH
00H–3BH
00H–3BH
00H–3BH
00H–59H
00H–59H
00H–59H
00H–59H
Seconds alarm
Minutes
0–59
0–59
Minutes alarm
0–59
01H–OCH AM;
81H–8CH PM
01H–12H AM;
81H–92H PM
Hours, 12-hour format
Hours, 24-hour format
1–12
0–23
4
5
00H–17H
00H–23H
01H–OCH AM;
81H–8CH PM
01H–12H AM;
81H–92H PM
Hours alarm, 12-hour format
1–12
Hours alarm, 24-hour format
Day of week (1=Sunday)
Day of month
0–23
1–7
00H–17H
01H–07H
01H–1FH
01H–0CH
00H–63H
01H-1FH
00H–23H
01H–07H
01H–31H
01H–12H
00H–99H
01–31H
6
7
1–31
1–12
0–99
1–31
8
Month
9
Year (see note)
D
Day of month alarm
Note:
Century for “Year” is shown in location 7Fh (Extended Index Register, bit 7) .
5