Operation; Time Setting Procedures; Figure 11.2 Examples Of Time Setting Procedures - Hitachi SH7751 Hardware Manual

Superh risc engine
Table of Contents

Advertisement

11.3

Operation

Examples of the use of the RTC are shown below.
11.3.1

Time Setting Procedures

Figure 11.2 shows examples of the time setting procedures.
Reset frequency divider
Set second/minute/hour/day/
day-of-week/month/year
Write to counter register
Yes
The procedure for setting the time after stopping the clock is shown in figure 11.2 (a). The
programming for this method is simple, and it is useful for setting all the counters, from second to
year.
Stop clock
Start clock operation
(a) Setting time after stopping clock
Clear carry flag
Carry flag = 1?
No
(b) Setting time while clock is running

Figure 11.2 Examples of Time Setting Procedures

Set RCR2.RESET to 1
Clear RCR2.START to 0
In any order
Set RCR2.START to 1
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Set RYRCNT first and RSECCNT last
Read RCR1 register and check CF bit
Rev. 3.0, 04/02, page 281 of 1064

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sh7751r

Table of Contents