Fujitsu FR60 Computer Hardware User Manual


  Open as PDF
of 1038
 
959
Chapter 49 Real-Time Clock
7.Q&A
7. Q&A
7.1 How do I set the count period of 1 second?
Stop Real-time Clock and then set the sub-second register WTBR. The reload value corresponds to the time
needed for half a second, i.e.
At 32 kHz RTC operation set WTBR to “001FFF
H
”.
At 100 kHz RTC operation set WTBR to “0061A7
H
”.
At 4 MHz RTC operation set WTBR to “0F423F
H
”.
7.2 How do I initialize Real-time Clock?
Use the start bit (WTCR.ST).
Changing the start bit from “1” to “0” resets the hour/minute/second counters and the 21 bit down counter
to “0” (initialization), and stops count operation.
7.3 How do I set or update time (hour/minute/second)?
Write values to the hour/minute/second registers, WTHR/WTMR/WTSR, and set the update bit (UPDT).
7.4 How do I start or stop Real-time Clock's counting?
Use the start bit (WTCR.ST).
7.5 How do I confirm that Real-time Clock is active?
Use the run flag (WTCR.RUN).
7.6 How do I know time?
Read the hour/minute/second registers, WTHR/WTMR/WTSR.
Note that only byte-access is allowed to these register. So, when these registers are read at the very timing of
changing over the hour or minute boundary as shown below, there is a possibility of misjudging the time. So,
read several times to get a logically consistent value.
Example: Read begins at the second register: 02:59:59 (SS) => 03:59:59 (SS) => 03:00:00
Read begins at the hour register: 02:59:59 => 02:00:00 => 03:00:00
7.7 How do I stop Real-time Clock?
See 7.4.
Operation Update bit (UPDT)
To update the hour/minute/second counters Set the bit to “1”.
Operation Start bit (ST)
To stop Real-time Clock's counting Set the bit to “0”.
To start Real-time Clock's counting Set the bit to “1”.
Operation Run flag (RUN)
Real-time Clock is inactive. The flag is set to “0”.
Real-time Clock is active. The flag is set to “1”.