RX 8564 LC

13.5.Flow Charts

The flow charts shown below are intended as examples only.

These examples are written to be easily understood, and therefore they may not be as efficient as the actual processing.

Ways to boost processing efficiency include setting several processes as parallel processes and changing the sequence of operations in areas where it does not create any problems. (Some of the processing described here may not be necessary under certain use conditions.)

To ensure that operations are as expected, make adjustments according to the use conditions (use environment).

1)Initialization example

Initialization

Initialize Control 1

register

Initialize Control 2

register

Set current time

Set alarm interrupt

Set CLKOUT output

Set timer interrupt

Go to next process

Initialize the Control 1 register. (Reg-00[h])

Be sure to write "0" to the two TEST bits.

Initialize the Control 2 register. (Reg-01[h])

Write "0" to the AIE and TIE bits to prevent output of unintended interrupts.

Set "[Year/Month/Day [day of week] hour:minute:second]. (Reg-02[h] to 08[h])

For current time setting, refer to "Write to clock and calendar" below.

Set the alarm interrupt function. (Reg-09[h] to 0C[h])

(If the alarm interrupt function is not being used, we recommend writing "1" to all four AE bits.)

Set the CLKOUT output pin's output status. (Reg-0D[h])

(Since the initial power-on setting is "output 32.768 kHz clock", write "0" to the FE bit to stop output.)

Set the timer interrupt function. (Reg-0E[h] to 0F[h])

(If the timer interrupt function is not used, write "0" to the TE bit.)

The address auto increment function can be used to set continuous writing from Reg - 00[h] to 0F[h] during initialization.

In such cases, be sure to write "1" to the STOP bit (to stop the clock) before starting the continuous write operation, and write "0" to the STOP bit (to start the clock) once initialization is completed.

2) Example of initial power-on processing

Initial power-on

processing

Wait

Initialization

Wait until the internal crystal oscillator has begun to oscillate.

(This wait time should be about one second. For details, refer to the regulation for the oscillation start time tSTA [s].)

Be sure to initialize all registers.

(For further description of initialization, see "Initialization" below.)

To next process

Page 29

ETM12E-01