Epson RX801SJ Applications Manual page 32

Real time clock module
Table of Contents

Advertisement

RX8010 SJ
Ex.2 This example is use only for clock functions.
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] ∼ 1C[h] )
Stop cancellation
( Reg − 1F[h] )
Start clock
3) The setting of a clock and calendar
START
STOP ← " 1 "
Write time
STOP ← " 0 "
Next process
• Reserved bits have to write in specified fixed value in the case
of initialization by all means.
• Write 04[h]
• Write 00[h]
• Write 40[h]
Set STOP bit to "1" to prevent timer update in time setting.
•Set the present time.
• The alarm function stops by initialization of Reg 1F[h].
Reg - 18h to 1Ah can be used as a RAM register.
•The Timer function stops by initialization of Reg - 1E[h] and Reg – 1F[h].
Reg – 1Bh to 1Ch can be used as a RAM register.
• Write 00[h]
Cancel STOP bit to "0" and start (restart) clock.
∗ When initialization is finished, be sure to set STOP bit to "0".
• Set STOP bit to "1" to prevent timer update in time setting.
• Write information of [ year / month /date [day of the week] hour:
minute: second ] which is necessary to set (or reset).
In case of initialization, please initialize all data.
• Cancel STOP bit to "0" and start (restart) timer movement.
Timer is started when set STOP bit to "0".
∗ It is able to set time even if not combined use of STOP bit.
Please note that [ clock is started at the time of writing [second ] ] in
case STOP bit is not used.
Page − 28
ETM37E-06

Advertisement

Table of Contents
loading

Table of Contents