BAT32G1x9 user manual | Chapter 11 Real-time clock
450 / 1149
Rev.1.02
11.3.9
Day count register (DAY).
This is an 8-bit register that represents the daily count value from 1 to 31 (decimal). The count is
incremented by the overflow of the hour counter. Counters make the following counts.
• 01
~
31 (month of 1, 3, 5, 7, 8, 10, 12)
• 01
~
30 (month of 4, 6, 9, 11)
• 01~29 (Leap year in February).
• 01~ 28 (February normal year).
At write time, the data is first written to the buffer and to the counter after passing through up to 2 f
RTC
clocks. The overflow of the hour count register is ignored during the write operation and is set to the write
value. The decimal 01~31 must be set in the BCD code.
Set the DAY register via the 8-bit memory operation instruction. After generating a reset signal,
the value of this register changes to "01H".
Figure 11-9 Format of the Day Count Register (DAY).
Address: 0x40044F56H
after reset:
01H R/W
Symbol
7 6 5 4 3 2 1 0
DAY
Note That to read and write this register
while the counter is running (
RTCE=1
), it must follow the steps described
in
"11.4.3 Reading and Writing to a Real-Time Clock Counter".
0
0
DAY20
DAY10
DAY8
DAY4
DAY2
DAY1