Setup Example - Panasonic MN101L Series User Manual

Lsi
Table of Contents

Advertisement

12.3.2

Setup Example

Periodic Interrupt Setup Example
The following is an example to generate a periodic interrupt with a cycle of a minute with the RTC function. Set
the initial time to "01:01:00 (Thursday), April 01, 2010" in 24-hour display mode.
The setup procedure and the description of each step are shown below.
Step
Setting
1
RTC stops
2
Periodic interrupt disabled
3
Display mode setting
Clock data setting
4
5
Periodic interrupt enabled
6
All maskable interrupts disabled
Interrupt level setting
7
8
Periodic Interrupt enabled
9
Maskable interrupts enabled
RTC starts
10
* For PSW, refer to [Chapter 2 CPU].
For PERI0ICR and PERI0EN, refer to [Chapter 3 Interrupts].
Symbol
RTCCTR
Set the CLKEN bit to "0".
RTCCIRQ
Set the CIRQMIEN bit to "0".
RTCCTR
Set the HDMD bit to "0".
-
Set the clock data to "01:01:00 (Thursday), April 01,
2010" using the following registers.
RTCYD
Set it to "0x10".
RTCMOD
Set it to "0x04".
RTCDD
Set it to "0x01".
RTCWD
Set it to "0x04".
RTCHD
Set it to "0x01".
RTCMID
Set it to "0x01".
RTCSD
Set it to "0x00".
RTCCIRQ
Set the CIRQMIEN bit to "1".
PSW *
Set the MIE bit to "0".
PERI0ICR * Set the PERI0LV1-0 bits to "00".
Clear the corresponding interrupt request bit of
PERI0DT register, if it may have already been set.
Refer to [3.1.5 Set up procedure for Interrupt control
register for peripheral function group]
PERI0EN *
Set the PERI0EN4 bit to "1".
PSW *
Set the MIE bit to "1".
RTCCTR
Set the CLKEN bit to "1".
The RTC starts.
Real Time Clock (RTC)
Description
RTC Operation
Chapter 12
XII - 17

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn101lr05dMn101lr04dMn101lr03dMn101lr02d

Table of Contents