Watch timerInterrupt requests are generated at 0.5-second intervals. (A watch clock oscillator is
Clock outputSelectable from fCLK, fCLK/2, fCLK/4, fCLK/8, or fCLK/16 (can be used as a 1-bit output port)
PWM outputs12-bit resolution × 2 channels
Serial interfaceUART/IOE (3-wire serial I/O):2 channels (on-chip baud rate generator)
APPENDIX A DEVELOPMENT TOOLS ..........................................................................................91
APPENDIX B RELATED DOCUMENTS .........................................................................................94
7Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
1. DIFFERENCES BETWEEN µPD784908 SUBSERIES PRODUCTS
The only difference between the µPD784907 and µPD784908 is their internal memory capacities.
The µPD78P4908 is produced by replacing the mask ROM in the µPD784907 or µPD784908 with 128-Kbyte one-
time PROM. Table 1-1 shows the differences between these products.
µ
Table 1-1. Differences between the
PD784908 Subseries Products
Part Number
Item
Internal ROM96 K (mask ROM)128 K (mask ROM)128 K (one-time PROM)
Internal RAM3,584 bytes4,352 bytes
RegulatorProvidedNone
Power supply voltageVDD = 4.0 to 5.5 VVDD = 4.5 to 5.5 V
(Main clock: fXX = 12.58 MHz, internal system clock = fXX,(Main clock: fXX = 12.58 MHz,
fCYK = 79 ns)internal system clock = fXX,
VDD = 3.5 to 5.5 VfCYK = 79 ns)
(other than above, fCYK = 159 ns)VDD = 4.0 to 5.5 V
Electrical specificationsRefer to the data sheet of each product.
µ
PD784907
µ
PD784908
µ
PD78P4908
(other than above,
fCYK = 159 ns)
8
Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
2. MAJOR DIFFERENCES BETWEEN µPD784908 AND µPD78098 SUBSERIES
External77
External extended functionProvided (up to 1 Mbyte)None
IEBus controllerIncorporated (simplified)Incorporated (complete hardware)
Power supply voltage• Mask ROM versionVDD = 2.7 to 6.0 V
VDD = 4.0 to 5.5 V
(Main clock: fXX = 12.58 MHz,
internal system clock = fXX, fCYK = 79 ns)
VDD = 3.5 to 5.5 V
(other than above, fCYK = 159 ns)
• PROM version
VDD = 4.5 to 5.5 V
(Main clock: fXX = 12.58 MHz,
internal system clock = fXX, fCYK = 79 ns)
VDD = 4.0 to 5.5 V
(other than above, fCYK = 159 ns)
2. Connect the REGOFF pin directly to VSS (select regulator operation).
3. Connect the REGC pin to V
10
SS
V
VDD
P51/A9
P60/A16
P57/A15
P56/A14
P55/A13
P54/A12
SS.
SS via a capacitor of the order of 1
Data Sheet U11680EJ2V0DS00
P53/A11
P52/A10
P50/A8
P47/AD7
P46/AD6
P45/AD5
P44/AD4
µ
F.
P43/AD3
µ
PD784907, 784908
A8 to A19:Address bus
AD0 to AD7:Address/data bus
ANI0 to ANI7:Analog input
ASCK, ASCK2: Asynchronous serial clock
ASTB:Address strobe
DD:Analog power supply
AV
AVREF1:Reference voltage
AVSS:Analog ground
CI:Clock input
CLKOUT:Clock output
HLDAK:Hold acknowledge
HLDRQ:Hold request
INTP0 to INTP5: Interrupt from peripherals
NMI:Non-maskable interrupt
P00 to P07:Port 0
P10 to P17:Port 1
P20 to P27:Port 2
P30 to P37:Port 3
P40 to P47:Port 4
P50 to P57:Port 5
P60 to P67:Port 6
P70 to P77:Port 7
P90 to P97:Port 9
P100 to P107:Port 10
PWM0, PWM1: Pulse width modulation output
RD:Read strobe
REFRQ:Refresh request
REGC:Regulator capacitance
REGOFF:Regulator off
RESET:Reset
RX:IEBus receive data
XD, RXD2:Receive data
R
SCK0 to SCK3: Serial clock
SI0 to SI3:Serial input
SO0 to SO3:Serial output
TEST:Test
TO0 to TO3:Timer output
TX:IEBus transmit data
XD, TXD2:Transmit data
T
VDD:Power supply
VSS:Ground
WAIT:Wait
WR:Write strobe
X1, X2:Crystal (main system clock)
XT1, XT2:Crystal (watch)
11Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
4. SYSTEM CONFIGURATION EXAMPLE (AUTOMOTIVE CAR AUDIO (TUNER DECK))
Front panelPD784908
Remote-controll
FIP
µ
TM
FIP
controller/driver
µ
signal reception
circuit
PC2800A, etc.
Key
matrix
PD16312, etc.
Interrupt input
SIO with automatic
transmission/reception
function
LED
display
Audio control
circuit
Electronic
volume
EEPROM
TM
3-wire serial I/O
µ
General-purpose
port
3-wire serial I/O
IEBus controller
REGOFF
REGC
Cassette deck
unit
Tuner pack
IEBus
driver/
receiver
IEBus
CD unit
CD changer,
one CD, etc.
DSP unit
TV unit
12
Data Sheet U11680EJ2V0DS00
5. BLOCK DIAGRAM
µ
PD784907, 784908
NMI
INTP0 to INTP5
INTP3
TO0
TO1
INTP0
INTP1
INTP2/CI
TO2
TO3
P00 to P03
P04 to P07
PWM0
PWM1
Programmable
interrupt controller
Timer/counter 0
(16 bits)
Timer/counter 1
(16 bits)
Timer/counter 2
(16 bits)
Timer 3
(16 bits)
Real-time output
port
PWM
78K/IV
CPU core
RAM
ROM
UART/IOE2
Baud-rate
generator
UART/IOE1
Baud-rate
generator
Clocked serial
interface
Clocked serial
interface 3
Clock output
Bus interface
RxD/SI1
TxD/SO1
ASCK/SCK1
RxD2/SI2
TxD2/SO2
ASCK2/SCK2
SCK0
SO0
SI0
SCK3
SO3
SI3
ASTB/CLKOUT
AD0 to AD7
A8 to A15
A16 to A19
RD
WR
WAIT/HLDRQ
REFRQ/HLDAK
ANI0 to ANI7
AV
DD
AV
REF1
AV
INTP5
TX
RX
RESET
TEST
X1
X2
REGC
REGOFF
V
V
XT1
XT2
SS
DD
SS
A/D converter
IEBus controller
System control
(regulator)
Watch timer
Watchdog timer
Remark The internal ROM and RAM capacities differ depending on the product.
Port 0
Port 1
Port 2
Port 3
Port 4
Port 5
Port 6
Port 7
Port 9
Port 10
P00 to P07
P10 to P17
P20 to P27
P30 to P37
P40 to P47
P50 to P57
P60 to P67
P70 to P77
P90 to P97
P100 to P107
13Data Sheet U11680EJ2V0DS00
6. PIN FUNCTIONS
6.1 Port Pins (1/2)
Pin NameI/OAlternate FunctionFunction
P00 to P07I/O—Port 0 (P0):
• 8-bit I/O port.
• Can be used as a real-time output port (4 bits × 2).
• Input and output can be specified by 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• Can drive transistors.
P10I/O—
P11—
P12ASCK2/SCK2
P13RxD2/SI2
P14TxD2/SO2
P15 to P17—
P20InputNMI
P21INTP0
P22INTP1
P23INTP2/CI
P24INTP3
P25INTP4/ASCK/SCK1
P26INTP5
P27SI0
P30I/ORxD/SI1
P31TxD/SO1
P32SCK0
P33SO0
P34 to P37TO0 to TO3
P40 to P47I/OAD0 to AD7Port 4 (P4):
P50 to P57I/OA8 to A15Port 5 (P5):
Port 1 (P1):
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• Can drive LEDs.
Port 2 (P2):
• 8-bit input port.
• P20 does not function as a general-purpose port (non-maskable interrupt).
However, the input level can be checked by an interrupt service routine.
• The use of on-chip pull-up resistors can be specified by software for pins
P22 to P27 (in 6-bit units).
• The P25/INTP4/ASCK/SCK1 pin functions as the SCK1 output pin by a
CSIM1 specification.
Port 3 (P3):
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• The use of the N-ch open drain can be specified for pins P32 and P33.
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• Can drive LEDs.
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• Can drive LEDs.
µ
PD784907, 784908
14
Data Sheet U11680EJ2V0DS00
6.1 Port Pins (2/2)
Pin NameI/OAlternate FunctionFunction
P60 to P63I/OA16 to A19
P64RD
P65WR
P66WAIT/HLDRQ
P67REFRQ/HLDAK
P70 to P77I/OANI0 to ANI7Port 7 (P7):
P90 to P97I/O—Port 9 (P9):
P100 toI/O—
P104
P105SCK3
P106SI3
P107SO3
Port 6 (P6):
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
Port 10 (P10):
• 8-bit I/O port.
• Input and output can be specified in 1-bit units.
• The use of on-chip pull-up resistors can be simultaneously specified by
software for all pins in input mode.
• The use of the N-ch open drain can be specified for pins P105 and P107.
µ
PD784907, 784908
15Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
6.2 Non-Port Pins (1/2)
Pin NameI/OAlternate FunctionFunction
TO0 to TO3OutputP34 to P37Timer output
CIInputP23/INTP2Input of a count clock for timer/counter 2
RxDInputP30/SI1Serial data input (UART0)
RxD2P13/SI2Serial data input (UART2)
TxDOutputP31/SO1Serial data output (UART0)
TxD2P14/SO2Serial data output (UART2)
ASCKInputP25/INTP4/SCK1Baud rate clock input (UART0)
ASCK2P12/SCK2Baud rate clock input (UART2)
SI0InputP27Serial data input (3-wire serial I/O 0)
SI1P30/RxDSerial data input (3-wire serial I/O 1)
SI2P13/RxD2Serial data input (3-wire serial I/O 2)
SI3P106Serial data input (3-wire serial I/O 3)
SO0OutputP33Serial data output (3-wire serial I/O 0)
SO1P31/TxDSerial data output (3-wire serial I/O 1)
SO2P14/TxD2Serial data output (3-wire serial I/O 2)
SO3P107Serial data output (3-wire serial I/O 3)
SCK0I/OP32Serial clock I/O (3-wire serial I/O 0)
SCK1P25/INTP4/ASCKSerial clock I/O (3-wire serial I/O 1)
SCK2P12/ASCK2Serial clock I/O (3-wire serial I/O 2)
SCK3P105Serial clock I/O (3-wire serial I/O 3)
NMIInputP20External interrupt—
INTP0P21request• Input of a count clock for timer/counter 1
• Capture/trigger signal for CR11 or CR12
INTP1P22• Input of a count clock for timer/counter 2
• Capture/trigger signal for CR22
INTP2P23/CI• Input of a count clock for timer/counter 2
• Capture/trigger signal for CR21
INTP3P24• Input of a count clock for timer/counter 0
• Capture/trigger signal for CR02
INTP4P25/ASCK/SCK1—
INTP5P26
AD0 to AD7I/OP40 to P47Time multiplexing address/data bus (for connecting external memory)
A8 to A15OutputP50 to P57High-order address bus (for connecting external memory)
A16 to A19OutputP60 to P63High-order address bus during address expansion (for connecting external
memory)
RDOutputP64Strobe signal output for reading the contents of external memory
WROutputP65Strobe signal output for writing on external memory
WAITInputP66/HLDRQWait insertion
REFRQOutputP67/HLDAKRefresh pulse output to external pseudo static memory
HLDRQInputP66/WAITInput of bus hold request
HLDAKOutputP67/REFRQOutput of bus hold response
ASTBOutputCLKOUTLatch timing output of time multiplexing address (A0 to A7) (for connecting
external memory)
Input of a conversion start trigger for A/D converter
when the regulator is stopped. Connect to VSS via a capacitor of order of 1µF.
REGOFF——Signal for specifying regulator operation
RESETInput—Chip reset
X1Input—Crystal input for system clock oscillation (A clock pulse can also be input
X2—
XT1Input—Watch clock connection
XT2——
ANI0 to ANI7InputP70 to P77Analog voltage input for A/D converter
AVREF1——To apply the reference voltage for A/D converter
AVDDPositive power supply for A/D converter
AVSSGND for A/D converter
VDDPositive power supply
VSSGND
TESTInputConnect directly to V
to the X1 pin.)
SS. (This pin is for IC test.)
Data Sheet U11680EJ2V0DS00
17
µ
PD784907, 784908
6.3 Pin I/O Circuits and Recommended Connections of Unused Pins
The input/output circuit type of each pin and recommended connections of unused pins are shown in Table 6-1.
For each type of input/output circuit, refer to Figure 6-1.
Table 6-1. Types of Pin I/O Circuits and Recommended Connections of Unused Pins (1/2)
Pin NameI/O Circuit TypeI/ORecommended Connections of Unused Pins
P00 to P075-AI/OInput: Connect to VDD
P10, P11
P12/ASCK2/SCK28-A
P13/RxD2/SI25-A
P14/TxD2/SO2
P15 to P17
P20/NMI2InputConnect to VDD or VSS
P21/INTP0
P22/INTP12-AConnect to VDD
P23/INTP2/CI
P24/INTP3
P25/INTP4/ASCK/SCK18-AI/OInput: Connect to VDD
P26/INTP52-AInputConnect to VDD
P27/SI0
P30/RxD/SI15-AI/OInput: Connect to VDD
P31/TxD/SO1
P32/SCK010-A
P33/SO0
P34/TO0 to P37/TO35-A
P40/AD0 to P47/AD7
P50/A8 to P57/A15
P60/A16 to P63/A19
P64/RD
P65/WR
P66/WAIT/HLDRQ
P67/REFRQ/HLDAK
P70/ANI0 to P77/ANI720I/OInput: Connect to VDD or VSS
P90 to P975-A
P100 to P104
P105/SCK310-A
P106/SI38-A
P107/SO310-A
ASTB/CLKOUT4OutputLeave open
Output:Leave open
Output:Leave open
Output:Leave open
Output:Leave open
18
Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
Table 6-1. Types of Pin I/O Circuits and Recommended Connections of Unused Pins (2/2)
Pin NameI/O Circuit TypeI/ORecommended Connections of Unused Pins
RESET2Input—
TEST1Connect directly to VSS
XT2——Leave open
XT1—InputConnect to V SS
PWM0, PWM13OutputLeave open
RX1InputConnect to VDD or VSS
TX3OutputLeave open
AVREF1——Connect to VSS
AVSS
AVDDConnect to VDD
CautionConnect an I/O pin, whose input/output mode is undefined, to VDD via a resistor of several
10 kΩ (especially if the voltage on the reset input pin rises higher than the low level input at power
on or when the mode is being switched between input and output by software).
Remark Since type numbers are commonly used in the 78K Series, these numbers are not always serial in each
product (some circuits are not included).
Data Sheet U11680EJ2V0DS00
19
Figure 6-1. I/O Circuits for Pins
Type 1Type 4
DD
V
P
Data
µ
PD784907, 784908
V
DD
P
OUT
IN
N
Push-pull output which can output high impedance
(both the positive and negative channels are off.)
Type 2
Type 5-A
Pull-up
enable
IN
Schmitt trigger input with hysteresis characteristics
Data
Output
disable
Input
enable
Type 2-AType 8-A
V
DD
Output
disable
N
V
DD
P
DD
V
P
IN/OUT
N
V
DD
Pull-up
P
Pull-up
enable
enable
Data
IN
Output
disable
Schmitt trigger input with hysteresis characteristics
Type 3Type 10-A
DD
V
Pull-up
enable
P-ch
Data
DataOUT
Open
N-ch
drain
Output
disable
V
DD
P
IN/OUT
N
P
V
DD
P
V
DD
P
IN/OUT
N
20
Data Sheet U11680EJ2V0DS00
Type 20
µ
PD784907, 784908
V
DD
Output
disable
Input
enable
Data
Comparator
(Threshold voltage)
P
IN/OUT
N
+
–
V
REF
P
N
Data Sheet U11680EJ2V0DS00
21
µ
PD784907, 784908
7. CPU ARCHITECTURE
7.1 Memory Space
A memory space of 1 Mbyte can be accessed. By using a LOCATION instruction, the mode for mapping internal
data areas (special function registers and internal RAM) can be selected. A LOCATION instruction must always be
executed after a reset, and can be used only once.
(1) When the LOCATION 0 instruction is executed
• Internal memory
The internal data area and internal ROM area are mapped as follows:
Part NumberInternal Data AreaInternal ROM Area
µ
PD7849070F100H to 0FFFFH00000H to 0F0FFH
10000H to 17FFFH
µ
PD7849080EE00H to 0FFFFH00000H to 0FDFFH
10000H to 1FFFFH
CautionThe following internal ROM areas, existing at the same addresses as the internal data areas,
cannot be used when the LOCATION 0 instruction is executed:
Part NumberUnusable Area
µ
PD7849070F100H to 0FFFFH (3,840 bytes)
µ
PD7849080EE00H to 0FFFFH (4,608 bytes)
• External memory
The external memory is accessed in external memory expansion mode.
(2) When the LOCATION 0FH instruction is executed
• Internal memory
The internal data area and internal ROM area are mapped as follows:
Part NumberInternal Data AreaInternal ROM Area
µ
PD784907FF100H to FFFFFH00000H to 17FFFH
µ
PD784908FEE00H to FFFFFH00000H to 1FFFFH
• External memory
The external memory is accessed in external memory expansion mode.
22
Data Sheet U11680EJ2V0DS00
Figure 7-1.
µ
PD784907 Memory Map
Data Sheet U11680EJ2V0DS00
FFFFFH
18000H
1 7FFFH
10000H
0FFFFH
0 FFDFH
0 FFD0H
0FF00H
0FEFFH
0F100H
0F0FFH
00000H
When the LOCATION 0
instruction is executed
External memory
(928 Kbytes)
Note 1
Internal ROM
(32,768 bytes)
Special function registers (SFRs)
Note 1
(256 bytes)
Internal RAM
(3,584 bytes)
Internal ROM
(61,696 bytes)
Note 4
0FEFFH
0FE80H
0FE7FH
0FE39H
0FE06H
0 FD0 0H
0 FCFFH
0F100H
17FFFH
10000H
0F0FFH
01000H
0 0FFFH
00800H
007FFH
00080H
0007FH
00040H
0003FH
00000H
General-purpose
registers (128 bytes)
Macro service control
word area (42 bytes)
Data area (512 bytes)
Program/data area
(3,072 bytes)
Note 2
Program/data area
CALLF entry area
(2 Kbytes)
CALLT table area
(64 bytes)
Vector table area
(64 bytes)
Note 3
FFEFFH
FFE80H
FFE7FH
FFE39H
FFE06H
FFD00H
F FCFFH
FF100H
1 7FFFH
FFFFFH
FFFDFH
FFFD0H
FFF00H
FFEFFH
FF100H
FF0FFH
18000H
1 7FFFH
00000H
When the LOCATION 0FH
instruction is executed
Special function registers (SFRs)
Note 1
(256 bytes)
Internal RAM
(3,584 bytes)
External memory
(946,432 bytes)
Internal ROM
(96 Kbytes)
Note 1
Note 4
µ
PD784907, 784908
23
Notes 1. Accessed in external memory expansion mode.
2. This 3,840-byte area can be used as an internal ROM area only when the LOCATION 0FH instruction is executed.
3. When the LOCATION 0 instruction is executed:94,464 bytes
When the LOCATION 0FH instruction is executed: 98,304 bytes
4. Base area and entry area based on a reset or interrupt. However, internal RAM is not used as a reset entry area.
24
Figure 7-2.
µ
PD784908 Memory Map
Data Sheet U11680EJ2V0DS00
FFFFFH
20000H
1FFFFH
10000H
0FFFFH
0FFDFH
0FFD0H
0FF 00H
0FEFFH
0EE00H
0EDFFH
00000H
When the LOCATION 0
instruction is executed
External memory
(896 Kbytes)
Note 1
Internal ROM
(65,536 bytes)
Special function registers (SFRs)
Note 1
(256 bytes)
Internal RAM
(4,352 bytes)
Internal ROM
(60,928 bytes)
Note 4
0FEFFH
0FE8 0H
0FE7 FH
0FE3 9H
0FE0 6H
0FD00H
0FCFFH
0EE00H
1FFFFH
10000H
0EDFFH
01000H
00FFFH
00800H
007 FFH
00080H
0007FH
00040H
0003FH
00000H
General-purpose
registers (128 bytes)
Macro service control
word area (42 bytes)
Data area (512 bytes)
Program/data area
(3,840 bytes)
Note 2
Program/data area
CALLF entry area
(2 Kbytes)
CALLT table area
(64 bytes)
Vector table area
(64 bytes)
Note 3
FFEFFH
FFE 8 0H
FFE 7 FH
FFE 3 9H
FFE 0 6H
FFD00H
FFCFFH
FEE 0 0 H
1FFFFH
FFFFFH
FFFDFH
FFFD0H
FFF00H
FFEFFH
FEE 0 0 H
FEDFFH
20000H
1FFFFH
00000H
When the LOCATION 0FH
instruction is executed
Special function registers (SFRs)
Note 1
(256 bytes)
Internal RAM
(4,352 bytes)
External memory
(912,896 bytes)
Internal ROM
(128 Kbytes)
Note 1
Note 4
µ
PD784907, 784908
Notes 1. Accessed in external memory expansion mode.
2. This 4,608-byte area can be used as an internal ROM area only when the LOCATION 0FH instruction is executed.
3. When the LOCATION 0 instruction is executed:126,464 bytes
When the LOCATION 0FH instruction is executed: 131,072 bytes
4. Base area and entry area based on a reset or interrupt. However, internal RAM is not used as a reset entry area.
µ
PD784907, 784908
7.2 CPU Registers
7.2.1 General-purpose registers
A set of general-purpose registers consists of sixteen 8-bit general-purpose registers. Two 8-bit general-purpose
registers can be combined to form a 16-bit general-purpose register. Moreover, four 16-bit general-purpose registers,
when combined with an 8-bit register for address extension, can be used as 24-bit address specification registers.
Eight banks of this register set are provided. The user can switch between banks by software or the context switching
function.
General-purpose registers other than the V, U, T, and W registers used for address extension are mapped onto
internal RAM.
Figure 7-3. General-Purpose Register Format
A (R1)X (R0)
AX (RP0)
B (R3)C (R2)
BC (RP1)
R5R4
RP2
R7R6
RP3
V
VVP (RG4)
U
UUP (RG5)
T
TDE (RG6)
WL (R14)
WHL (RG7)
The character strings enclosed in
parentheses represent absolute names.
R9R8
VP (RP4)
R11R10
UP (RP5)
D (R13)E (R12)
DE (RP6)
H (R15)
HL (RP7)
8 banks
CautionBy setting the RSS bit of PSW to 1, R4, R5, R6, R7, RP2, and RP3 can be used as the X, A, C,
B, AX, and BC registers, respectively. However, this function must be used only when using
programs for the 78K/III series.
Data Sheet U11680EJ2V0DS00
25
µ
PD784907, 784908
7.2.2 Control registers
(1) Program counter (PC)
This register is a 20-bit program counter. The program counter is automatically updated by program execution.
Figure 7-4. Format of Program Counter (PC)
190
PC
(2) Program Status Word (PSW)
This register holds the CPU state. The program status word is automatically updated by program execution.
Figure 7-5. Format of Program Status Word (PSW)
PSW
PSWH
PSWL
15141312
UFRBS2RBS1RBS0
76543210
SZRSS
Note
ACIEP/V0CY
111098
Note This flag is used to maintain compatibility with the 78K/III Series. This flag must be set to 0 when
programs for the 78K/III Series are not being used.
(3) Stack pointer (SP)
This register is a 24-bit pointer for holding the start address of the stack.
The higher 4 bits must be set to 0.
Figure 7-6. Format of Stack Pointer (SP)
23200
SP0000
26
Data Sheet U11680EJ2V0DS00
µ
PD784907, 784908
7.2.3 Special function registers (SFRs)
The special function registers are registers with special functions such as mode registers and control registers for
built-in peripheral hardware. The special function registers are mapped onto the 256-byte space between 0FF00H
Note
and 0FFFFH
Note On execution of the LOCATION 0 instruction. FFF00H to FFFFFH when the LOCATION 0FH instruction
CautionDo not access an address in this area where no SFR is allocated, as the
Table 7-1 lists the special function registers (SFRs). The symbols of the table columns are explained below.
• Symbol.................................... Symbol indicating an on-chip SFR. The symbols listed in the table are reserved
• R/W ......................................... Indicates whether the SFR is read-only, write-only, or read/write.
• Bit units for manipulation ....... Indicates the maximum number of bits that can be manipulated whenever an SFR
• After reset............................... Indicates the state of the register when the RESET signal has been input.
.
is executed.
in the deadlock state. The deadlock state can be cleared only by a reset.
words for the NEC assembler (RA78K4). In the C compiler (CC78K4), the
symbols can be used as sfr variables with the #pragma sfr command.
R/W: Read/write
R:Read-only.
W:Write-only.
is manipulated. An SFR that supports 16-bit manipulation can be described in
the sfrp operand. For address specification, an even-numbered address must
be specified.
An SFR that can be manipulated in 1-bit units can be described as the operand
of a bit manipulation instruction.
µ
PD784908 may be placed
Data Sheet U11680EJ2V0DS00
27
Table 7-1. Special Function Registers (SFRs) (1/5)
0FF14HCompare register L (timer/counter 1)CR10
0FF15HCompare register H (timer/counter 1) ———
0FF16HCapture/compare register L (timer/counter 1)CR11
0FF17HCapture/compare register H (timer/counter 1) ———
0FF18HCompare register L (timer/counter 2)CR20
0FF19HCompare register H (timer/counter 2) ———
0FF1AHCapture/compare register L (timer/counter 2)CR21
0FF1BHCapture/compare register H (timer/counter 2) ———
0FF1CHCompare register L (timer 3)CR30
0FF1DHCompare register H (timer 3) ———
0FF20HPort 0 mode registerPM0—FFH
0FF21HPort 1 mode registerPM1—
0FF23HPort 3 mode registerPM3—
0FF24HPort 4 mode registerPM4—
0FF25HPort 5 mode registerPM5—
0FF26HPort 6 mode registerPM6—
0FF27HPort 7 mode registerPM7—
0FF29HPort 9 mode registerPM9—
0FF2AHPort 10 mode registerPM10—
0FF2EHReal-time output port control registerRTPC—00H
0FF30HCapture/compare control register 0CRC0——10H
0FF31HTimer output control registerTOC—00H
0FF32HCapture/compare control register 1CRC1——
0FF33HCapture/compare control register 2CRC2—
Note
Special Function Register (SFR) NameSymbolR/W
CR10W
CR11W
CR20W
CR21W
CR30W
Bit Units for Manipulation
1 bit 8 bits 16 bits
—
—
—
—
—
—10H
After Reset
Note When the LOCATION 0 instruction is executed. When the LOCATION 0FH instruction is executed, F0000H
is added to each address.
28
Data Sheet U11680EJ2V0DS00
µ
Table 7-1. Special Function Registers (SFRs) (2/5)
PD784907, 784908
Address
0FF36HCapture register (timer/counter 0)CR02R——0000H
0FF38HCapture register L (timer/counter 1)CR12
0FF39HCapture register H (timer/counter 1) ———
0FF3AHCapture register L (timer/counter 2)CR22
0FF3BHCapture register H (timer/counter 2) ———
0FF41HPort 1 mode control registerPMC1R/W—00H
0FF43HPort 3 mode control registerPMC3—
0FF4AHPort 10 mode control registerPMC10—
0FF4EHRegister L for optional pull-up resistorPUOL—
0FF4FHRegister H for optional pull-up resistorPUOH—
0FF50HTimer register 0TM0R——0000H
0FF51H——
0FF52HTimer register 1TM1TM1W—
0FF53H ———
0FF54HTimer register 2TM2TM2W—
0FF55H ———
0FF56HTimer register 3TM3TM3W—
0FF57H ———
0FF5CHPrescaler mode register 0PRM0R/W——11H
0FF5DHTimer control register 0TMC0—00H
0FF5EHPrescaler mode register 1PRM1——11H
0FF5FHTimer control register 1TMC1—00H
0FF68HA/D converter mode registerADM—00H
0FF6AHA/D conversion result registerADCRR——Undefined
0FF6CHA/D current cut selection registerIEADR/W—00H
0FF6FHClock timer mode registerWM—
0FF70HPWM control registerPWMC—05H
0FF71HPWM prescaler registerPWPR——00H
0FF72HPWM modulo register 0PWM0——Undefined
0FF74HPWM modulo register 1PWM1——
0FF7DHOne-shot pulse output control registerOSPC—00H
0FF80HClocked serial interface mode register 3CSIM3—
0FF82HClocked serial interface mode registerCSIM
Note
Special Function Register (SFR) NameSymbolR/W
CR12W
CR22W
Bit Units for Manipulation
1 bit 8 bits 16 bits
—
—
—
After Reset
Note When the LOCATION 0 instruction is executed. When the LOCATION 0FH instruction is executed, F0000H
is added to each address.
Data Sheet U11680EJ2V0DS00
29
Table 7-1. Special Function Registers (SFRs) (3/5)
µ
PD784907, 784908
Address
0FF84HClocked serial interface mode register 1CSIM1R/W—00H
0FF85HClocked serial interface mode register 2CSIM2—
0FF86HSerial shift registerSIO——Undefined
0FF88HAsynchronous serial interface mode registerASIM—00H
0FF89HAsynchronous serial interface mode register 2ASIM2—
0FF8AHAsynchronous serial interface status registerASISR—
0FF8BHAsynchronous serial interface status register 2 ASIS2—
0FF8CHSerial receive buffer: UART0RXB——Undefined