CMS32L051 User Manual |Chapter 7 Real-Time Clock
www.mcu.com.cn 230 / 703
7.3.8 Hour count register (HOUR).
This is an 8-bit register that represents the hour count value in 00 ~ 23 or 01 ~ 12, 21 ~ 32 (decimal).
Incremental counting is performed by means of the overflow of the minute counter.
At write time, data is first written to the buffer and to the counter after up to 2 f
RTC
clocks. Overflow of the
minute count register is ignored during a write operation and set to a write value.
The time system must be set at bit3 (AMPM) of register 0 (RTCC0) according to the real-time clock control
register 0 (RTCC0), and the decimal 00 ~ in BCD code 23 or 01~12, 21~32.
If you change the value of the AMPM bit, the value of the HOUR register becomes the corresponding value
of the time system being set. The Hour register is set via an 8-bit memory operation command. After the reset
signal is generated, the value of this register changes to 12H.
However, if the AMPM bit 1 is removed after the reset, the value of this register becomes 00H.
Figure 7-9 Hour count register (HOUR)
Address: 0x40044F54 After reset: 12HR/W
Symbol
7 6 5 4 3 2 1 0
HOUR
Note 1 When the AMPM bit is selected as 0 (12-hour system), bit5 (HOUR20) of the Hour register is indicated AM(0)
/PM(1).
2. To read and write this register while the counter is running (RTCE=1), you must follow the steps described in 7.4.3
Read and write to the real-time clock counter.