Mitsubishi microcomputers
M30201 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Controlling Power Applications
356
Figure 3.6.3. Set-up procedure of controlling power using stop mode (1)
Canceling protect
Protect register [Address 000A16]
PRCR
b7
b0
1
Enables writing to system clock control registers 0 and 1
(addresses 000616 and 000716)
1 : Write-enabled
Main
NOP instruction X 5
Key input interrupt request generation
Setting interrupt except stop mode cancel
I
nterrupt control register KUPIC
[Address 004D16]
ADIC
[Address 004E16]
SiTIC(i=0, 1)
[Address 005116, 005316]
SiRIC(i=0, 1)
[Address 005216, 005416]
TAiIC(i=0)
[Address 005516]
TXiIC(i=0 to 2) [Address 005616 to 005816]
TBiIC(i=0, 1)
[Address 005A16, 005B16]
Interrupt priority level select bit
0 0 0 : Interrupt disabled
b7
b0
0
Interrupt priority level select bit
0 0 0 : Interrupt disabled
b7
b0
0
INTiIC(i=0, 1)
[Address 005D16, 005E16]
0
Always set to “0”
All clocks off (stop mode)
System clock control register 1 [Address 000716]
CM1
b7
b0
All clock stop control bit
1 : All clocks off (stop mode)
1
00 00
Reserved bit
Always set to “0”
Setting operation clock after returning from stop mode
System clock control register 0
[Address 000616]
CM0
XCIN-XCOUT generation
Port XC select bit
b7
b0
System clock select bit
XCIN, XCOUT
As this register becomes setting mentioned above when operating with XCIN
(count source of BCLK is XCIN), the user does not need to set it again.
When operating with XIN, set port Xc select bit to “1” before setting system
clock select bit to “1”. The both bits cannot be set at the same time.
1
(When operating with XCIN after returning)
System clock control register 0
[Address 000616]
CM0
On
Main clock (XIN-XOUT) stop bit
b7
b0
System clock select bit
XIN, XOUT
As this register becomes setting mentioned above when
operating with XIN (count source of BCLK is XIN),
the user does not need to set it again.
00
(When operating with XIN after returning)
Interrupt enable flag (I flag)
“1”
Initial condition
b7
b0
Pull-up control register 0
[Address 03FC16]
PUR0
P00 to P03 pulled high
1
Port P3 register
[Address 03E516]
P3
b7
b0
0
Key scan data
Interrupt enable level (IPL) = 0
Interrupt enable flag (I) =0
Key input interrupt control register
[Address 004D16]
KUPIC
Interrupt priority level select bit
Set higher value than the present IPL
b7
b0
1
0
Port P0 direction register
[Address 03E216]
PD0
Key scan input port
b7
b0
0
P04 to P07 pulled high
1
Port P3 direction register
[Address 03E716]
PD3
Key scan output port
b7
b0
1