R8C/12 Group 2. Central Processing Unit (CPU)
Rev.1.20 Jan 27, 2006 page 8 of 25
REJ03B0068-0120
2.2 Address Registers (A0 and A1)
A0 is a 16-bit register for address register indirect addressing and address register relative addressing.
They also are used for transfer, arithmetic and logic operations. The same applies to A1 as A0. A0 can
be combined with A0 to be used as a 32-bit address register (A1A0).
2.3 Frame Base Register (FB)
FB is a 16-bit register for FB relative addressing.
2.4 Interrupt Table Register (INTB)
INTB is a 20-bit register indicates the start address of an interrupt vector table.
2.5 Program Counter (PC)
PC, 20 bits wide, indicates the address of an instruction to be executed.
2.6 User Stack Pointer (USP) and Interrupt Stack Pointer (ISP)
The stack pointer (SP), USP and ISP, are 16 bits wide each. The U flag of FLG is used to switch
between USP and ISP.
2.7 Static Base Register (SB)
SB is a 16-bit register for SB relative addressing.
2.8 Flag Register (FLG)
FLG is a 11-bit register indicating the CPU state.
2.8.1 Carry Flag (C)
The C flag retains a carry, borrow, or shift-out bit that has occurred in the arithmetic logic unit.
2.8.2 Debug Flag (D)
The D flag is for debug only. Set to 0.
2.8.3 Zero Flag (Z)
The Z flag is set to 1 when an arithmetic operation resulted in 0; otherwise, 0.
2.8.4 Sign Flag (S)
The S flag is set to 1 when an arithmetic operation resulted in a negative value; otherwise, 0.
2.8.5 Register Bank Select Flag (B)
The register bank 0 is selected when the B flag is 0. The register bank 1 is selected when this flag
is set to 1.
2.8.6 Overflow Flag (O)
The O flag is set to 1 when the operation resulted in an overflow; otherwise, 0.
2.8.7 Interrupt Enable Flag (I)
The I flag enables a maskable interrupt.
An interrupt is disabled when the I flag is set to 0, and are enabled when the I flag is set to 1. The
I flag is set to 0 when an interrupt request is acknowledged.
2.8.8 Stack Pointer Select Flag (U)
ISP is selected when the U flag is set to 0, USP is selected when the U flag is set to 1.
The U flag is set to 0 when a hardware interrupt request is acknowledged or the INT instruction of
software interrupt numbers 0 to 31 is executed.
2.8.9 Processor Interrupt Priority Level (IPL)
IPL, 3 bits wide, assigns processor interrupt priority levels from level 0 to level 7.
If a requested interrupt has greater priority than IPL, the interrupt is enabled.
2.8.10 Reserved Bit
When write to this bit, set to 0. When read, its content is indeterminate.
R8C/12 Group 3. Memory
Rev.1.20 Jan 27, 2006 page 9 of 25
REJ03B0068-0120
3. Memory
Figure 3.1 is a memory map of this MCU. This MCU provides 1-Mbyte address space from addresses
0000016 to FFFFF16.
The internal ROM (program ROM) is allocated lower addresses beginning with address 0FFFF16. For
example, a 16-Kbyte internal ROM is allocated addresses from 0C00016 to 0FFFF16.
The fixed interrupt vector table is allocated addresses 0FFDC16 to 0FFFF16. They store the starting
address of each interrupt routine.
The internal ROM (data flash) is allocated addresses from 0200016 to 02FFF16.
The internal RAM is allocated higher addresses beginning with address 0040016. For example, a 1-Kbyte
internal RAM is allocated addresses 0040016 to 007FF16. The internal RAM is used not only for storing
data, but for calling subroutines and stacks when interrupt request is acknowledged.
Special function registers (SFR) are allocated addresses 0000016 to 002FF16. The peripheral function
control registers are located them. All addresses, which have nothing allocated within the SFR, are re-
served area and cannot be accessed by users.
Figure 3.1 Memory Map
0
0
0
0
0
1
6
0
Y
Y
Y
Y
1
6
0
F
F
F
F
1
6
0
0
2
F
F
1
6
00400
16
I
n
t
e
r
n
a
l
R
O
M
(
p
r
o
g
r
a
m
R
O
M
)
S
F
R
(
S
e
e
C
h
a
p
t
e
r
4
f
o
r
d
e
t
a
i
l
s
.
)
0FFDC
16
0FFFF
16
U
n
d
e
f
i
n
e
d
i
n
s
t
r
u
c
t
i
o
n
Overflow
BRK instruction
Address match
Single step
W
a
t
c
h
d
o
g
t
i
m
e
r
O
s
c
i
l
l
a
t
i
o
n
s
t
o
p
d
e
t
e
c
t
i
o
n
R
e
s
e
t
(Reserved)
Type name
0
X
X
X
X
1
6
Internal RAM
F
F
F
F
F
1
6
A
d
d
r
e
s
s
0
X
X
X
X
1
6
005FF
16
Internal RAM
S
i
z
e
007FF
16
5
1
2
b
y
t
e
s
1
K
b
y
t
e
006FF
16
7
6
8
b
y
t
e
s
Address 0YYYY
16
0E000
16
Internal ROM
S
i
z
e
0C000
16
8K bytes
16K bytes
0D000
16
12K bytes
Expansion area
(Reserved)
R
5
F
2
1
1
2
4
F
P
,
R
5
F
2
1
1
2
4
D
F
P
R
5
F
2
1
1
2
3
F
P
,
R
5
F
2
1
1
2
3
D
F
P
R
5
F
2
1
1
2
2
F
P
,
R
5
F
2
1
1
2
2
D
F
P
0
2
0
0
0
1
6
0
2
F
F
F
1
6
I
n
t
e
r
n
a
l
R
O
M
(
d
a
t
a
f
l
a
s
h
)
(1
)
N
O
T
E
S
:
1
.
T
h
e
d
a
t
a
f
l
a
s
h
b
l
o
c
k
A
(
2
K
b
y
t
e
s
)
a
n
d
b
l
o
c
k
B
(
2
K
b
y
t
e
s
)
a
r
e
s
h
o
w
n
.
2
.
B
l
a
n
k
s
p
a
c
e
a
r
e
r
e
s
e
r
v
e
d
.
N
o
a
c
c
e
s
s
i
s
a
l
l
o
w
e
d
.
R8C/12 Group 4. Special Function Register (SFR)
Rev.1.20 Jan 27, 2006 page 10 of 25
REJ03B0068-0120
Watchdog timer start register WDTS XX
16
W
a
t
c
h
d
o
g
t
i
m
e
r
c
o
n
t
r
o
l
r
e
g
i
s
t
e
rW
D
C0
0
0
1
1
1
1
1
2
P
r
o
c
e
s
s
o
r
m
o
d
e
r
e
g
i
s
t
e
r
0P
M
0X
X
X
X0X
0
0
2
S
y
s
t
e
m
c
l
o
c
k
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
0C
M
00
1
1
0
1
0
0
0
2
S
y
s
t
e
m
c
l
o
c
k
c
o
n
t
r
o
l
r
e
g
i
s
t
e
r
1C
M
10
0
1
0
0
0
0
0
2
A
d
d
r
e
s
s
m
a
t
c
h
i
n
t
e
r
r
u
p
t
e
n
a
b
l
e
r
e
g
i
s
t
e
rA
I
E
RX
X
X
X
X
X
0
0
2
Protect register PRCR 00XXX000
2
Processor mode register 1 PM1 00XXX0X0
2
N
O
T
E
S
:
1
.
B
l
a
n
k
s
p
a
c
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A
d
d
r
e
s
s
Register Symbol After reset
A
d
d
r
e
s
s
m
a
t
c
h
i
n
t
e
r
r
u
p
t
r
e
g
i
s
t
e
r
0R
M
A
D
00
0
1
6
0
0
1
6
X
0
1
6
A
d
d
r
e
s
s
m
a
t
c
h
i
n
t
e
r
r
u
p
t
r
e
g
i
s
t
e
r
1R
M
A
D
10
0
1
6
0
0
1
6
X
0
1
6
W
a
t
c
h
d
o
g
t
i
m
e
r
r
e
s
e
t
r
e
g
i
s
t
e
rW
D
T
RX
X
1
6
4. Special Function Register (SFR)
SFR(Special Function Register) is the control register of peripheral functions. Tables 4.1 to 4.4 list the SFR
information
Table 4.1 SFR Information(1)
(1)

R5F21122DFP#U0

Mfr. #:
Manufacturer:
Renesas Electronics
Description:
16-bit Microcontrollers - MCU MCU 3/5V 8K I-Temp Pb-Free 32-LQFP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet