6) Setting wake-up timer interpunction example
• write initial data to the Down counter.
• Set TE bit to “1” to start wake-up timer counter.
Be aware that initial data should be pre-set to counter before starting.
• Set TIE to "1", for interruption output from INT-pin.
• While TSTP is "1", timer countdown doesn't occur.
When TSTP clears by 0, The Countdown timer works again.
TSTP is useful for working time counter of machine, etc.
• Clear TE bit to “0” to inactivate wake-up timer interruption.
• Set TSEL1, TSEL0 bit combination to count down period (source clock).
• Clear the TF-bit by zero.
Figure 43 Example flow (Setting wake-up timer interrupt function)
7) Setting Alarm Example
• Set AIE bit to “1”, for outputs Alarm interruption from INT-pin.
• Specify week alarm or day alarm, by WADA bit.
• Reset AIE bit to “0” to inactivate alarm interruption.
Reg − 2C[h],17[h] 19[h]
Figure 44 Example flow (Setting alarm interrupt function)