Epson RX801SJ Applications Manual page 31

Real time clock module
Table of Contents

Advertisement

RX8010 SJ
2) An example of the initialization
Ex.1 Initialize
START
Setting the reserved bits
Reg − 17[h], 30[h]∼ 32[h]
Reg − 1D[h]
Reg − 1E[h]
Reg − 1F[h]
Setting the present time
( Reg − 10[h] ∼ 16[h] )
Setting the Alarm function
( Reg −18[h] ∼ 1A[h] )
Setting the Timer function
( Reg −1B[h] ∼ 1F[h],32[h] )
Setting the Update function
( Reg − 1D[h] ∼ 1F[h] )
Next processing
• Reserved bits have to write in specified fixed value in the case
of initialization by all means.
• Set TE bit to "0".
• Set FSEL1, 0 bit optionally.
• Clear VLF bit to "0".
• Surely set TEST bit to " 0 ".
• Set AIE, TIE, UIE bit to "0 " to prevent unprepared interruption output.
• Set the present time.
∗ Setting the present time concerned, please refer to item of [ Clock and
calendar writing ] .
• Set the Alarm interrupt function.
When the alarm interrupt function is not being used, the Alarm registers
(Reg - 18h to 1Ah) can be used as a RAM register. In such cases, be sure to
write "0" to the AIE bit.
• Set the fixed-cycle Timer function.
When the fixed-cycle timer function is not being used, the fixed-cycle timer
register (Reg – 1B to 1C) can be used as a RAM register. In such cases,
stop the fixed-cycle timer function by writing "0" to the TE and TIE bits.
• Set the Update interrupt function.
∗ When initialization is finished, be sure to set STOP bit to "0".
Page − 27
ETM37E-06

Advertisement

Table of Contents
loading

Table of Contents