The µPD78F9328 is a µPD789327 Subseries (designed for remote controller with on-chip LCD) product in the
78K/0S Series, featuring expanded flash memory in place of the internal ROM of the µPD789322, 789324, 789326,
and 789327.
Because flash memory allows the program to be written and erased with the device mounted on the target board,
this product is ideal for development trials, small-scale production, or for applications that require frequent upgrades.
Detailed function descriptions are provided in the following user’s manuals. Be sure to read them before
designing.
µµµµ
PD789327, 789467 Subseries User’s Manual: To be prepared
78K/0S Series User’s Manual Instructions: U11047E
FEATURES
• Pin-compatible with mask ROM product (except VPP)
• Flash memory: 32 Kbytes
• Internal high-speed RAM: 512 bytes
• LCD display RAM: 24 bytes
• Variable minimum instruction execution time: High speed (0.4 µs: @5.0-MHz operation with main system clock),
low speed (1.6 µs: @5.0-MHz operation with main system clock), and ultra low speed (122 µs: @32.768-kHz
operation with subsystem clock)
• I/O ports: 21
• Serial interface (3-wire serial I/O mode): 1 channel
• LCD controller/driver
Segment signals: 24
Common signals: 4
• Timer: 4 channels
• Supply voltage: VDD = 1.8 to 5.5 V
APPLICATIONS
Remote-control devices, healthcare equipment, etc.
ORDERING INFORMATION
Part NumberPackage
PD78F9328GB-8ET52-pin plastic LQFP (10 mm × 10 mm)
µ
The information contained in this document is being issued in advance of the production cycle for the
device. The parameters for the device may change before final production or NEC Corporation, at its own
discretion, may withdraw the device prior to its production.
Not all devices/types available in every country. Please check with local NEC representative for
availability and additional information.
Document No. U14411EJ1V0PM00 (1st edition)
Date Published November 1999 N CP(K)
Printed in Japan
78K/0S SERIES LINEUP
The products in the 78K/0S Series are listed below. The names enclosed in boxes are subseries names.
Products in mass production
Products under development
Small-scale, general-purpose applications
µ
44-pin
42-/44-pin
28-pin
µ
PD789046
µ
PD789026
PD789014
µ
Small-scale, general-purpose applications + A/D
PD789026 with internal subsystem clock
PD789014 with enhanced timer and expanded ROM, RAM
µ
On-chip UART. Capable of low-voltage (1.8 V) operation
RC oscillation version of the PD789197AY
PD789177 with on-chip EEPROM
µ
PD789167 with enhanced A/D converter
µ
µ
PD789104A with enhanced timer
µ
PD789146 with enhanced A/D converter
PD789104A with EEPROM
µ
PD789124A with enhanced A/D converter
µ
RC oscillation version of the PD789104A
PD789104A with enhanced A/D converter
µ
PD789026 with added A/D, multiplier
µ
On-chip inverter control circuit and UART
On-chip UART and dot LCD
µ
PD789407A with enhanced A/D converter
µ
PD789457 with enhanced I/O
µ
PD789447 with enhanced A/D converter
RC oscillation version of the PD789427
µ
PD789427 with enhanced A/D converter
µ
PD789306 with A/D converter
RC oscillation version of the PD789306
Basic subseries for LCD drive
µ
TM
and SMB
µ
µ
µ
ASSP
44-pin
44-pin
20-pin
20-pin
5-pin
2
PD789800
µ
µ
PD789840
µ
PD789861
µ
PD789860
IC card
PD789810
µ
Preliminary Product Information U14411EJ1V0PM00
For PC keyboard, on-chip USB function
For key pad, on-chip POC
RC oscillation version of the PD789860
For keyless entry, on-chip POC and key return circuit
On-chip EEPROM, security circuit
µ
The major functional differences among the subseries are listed below.
µµµµ
PD78F9328
Subseries Name
PD78904616 K1 ch
Smallscale,
generalpurpose
applications
Smallscale,
generalpurpose
applications
+ A/D
Inverter
µ
PD7890264 K to 16 K
µ
PD7890142 K to 4 K2 ch
µ
µ
PD789217AY
µ
PD789197AY
PD789177
µ
PD789167
µ
PD789156
µ
PD789146
µ
PD789134A
µ
µ
PD789124A
µ
PD789114A
PD789104A
µ
PD7898428 K to 16 K3 ch
µ
control
LCD drive
PD78983024 K1 ch
µ
PD789417A
µ
PD789407A
µ
PD789457
µ
PD7894474 ch
µ
PD789437
µ
PD789427
µ
PD789316
µ
PD789306
µ
ROM
Capacity
8-Bit 16-Bit
TimerFunction
Watch
1 ch1 ch34
−
−
16 K to 24 K 3 ch1 ch
8 K to 16 K
1 ch
1 ch
−
2 K to 8 K
Note
1 ch1 ch 8 ch
1 ch1 ch 1 ch
12 K to 24 K 3 ch
16 K to 24 K
2 ch
8 K to 16 K
WDT
1 ch
1 ch
8-Bit
10-Bit
A/D
−−
−
Serial InterfaceI/O V
A/D
1 ch (UART: 1 ch)
2 ch UART: 1ch
8 ch
SMB : 1ch
1 ch (UART: 1 ch)
8 ch
4 ch
4 ch
4 ch
−
4 ch
−
−
4 ch
−
−
4 ch
−
−
1 ch (UART: 1 ch)304.0 V
−
1 ch (UART: 1 ch)
−
−
7 ch431.8 V
7 ch
−
4 ch
−
2 ch (UART: 1 ch)
−
4 ch
−
4 ch
−
−
DD
Min.
Value
1.8 V
22
31
1.8 V
20
302.7 V
25
23
Remarks
−
RC oscillation
version,
on-chip
EEPROM
On-chip
EEPROM
−
On-chip
EEPROM
RC oscillation
version
−
−
−
RC oscillation
version
−
RC oscillation
version
−
ASSP
PD789800
µ
PD789840
µ
PD789861
µ
PD789860
µ
IC cardµPD7898106 K
10-bit timer: 1 channel
Note
8 K1 ch
4 K
2 ch
−
−−−
Preliminary Product Information U14411EJ1V0PM00
1 ch
−
−
2 ch (USB: 1 ch)314.0 V
−
−
4 ch1 ch292.8 V
−
−
141.8 V
RC oscillation
version
−
1 ch
−−−
12.7 V
On-chip
EEPROM
3
OVERVIEW OF FUNCTIONS
ItemDescription
µµµµ
PD78F9328
Internal memory
Main system clock
(oscillation frequency)
Subsystem clock
(oscillation frequency)
General-purpose registers8 bits × 8 registers
Instruction set
I/O portsTotal: 21
Timers
Timer outputs1
Serial interface3-wire serial I/O mode: 1 channel
LCD controller/driver
sources
Reset
Supply voltageVDD = 1.8 to 5.5 V
Operating ambient temperatureTA = −40 to +85°C
Package52-pin plastic LQFP (10 m m × 10 mm)
3.1 Port Pins......................................................................................................................................... 9
4.3.1 Control registers...............................................................................................................................15
5.1.1 Port functions....................................................................................................................................19
5.1.2 Port configuration .............................................................................................................................21
5.1.3 Port function control registers...........................................................................................................22
Caution In normal operation mode, directly connect the VPP pin to VSS.
COM0 to COM3: Common OutputRESET:Reset
INT:Interrupt from PeripheralsS0 to S23:Segment Output
KR00 to KR03:Key ReturnSCK10:Serial Clock Input/Output
P00 to P03:Port 0SI10:Serial Data Input
P10, P11:Port 1SO10:Serial Data Output
DD
P20 to P22:Port 2V
P40 to P43:Port 4V
:Power Supply
LC0
:Power Supply for LCD
P60, P61:Port 6VPP:Programming Power Supply
P80 to P85:Port 8VSS:Ground
TO40:Timer OutputX1, X2:Crystal (Main system clock)
XT1, XT2:Crystal (Sabsystem clock)
Preliminary Product Information U14411EJ1V0PM00
7
2. BLOCK DIAGRAM
µµµµ
PD78F9328
TO40/P60
SCK10/P20
SO10/P21
SI10/P22
S0 to S23
COM0 to COM3
V
LC0
8-bit
timer 30
8-bit
timer 40
Watchdog timer
Serial interface 10
Cascaded
16-bit
timer
Watch timer
LCD
controller/driver
78K/0S
CPU core
RAM
Flash
memory
RAM
space for
LCD data
Port 0
Port 1
Port 2
Port 4
Port 6
Port 8
System control
P00 to P03
P10, P11
P20 to P22
P40 to P43
P60, P61
P80 to P85
RESET
X1
X2
XT1
XT2
Power-on clear
VDDVSSV
INT/P61
Interrupt control
PP
KR00/P40 to
KR03/P43
8
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
3. PIN FUNCTIONS
3.1 Port Pins
Pin NameI/OFunctionAf ter ResetAlternate Function
P00 to P03I/OPort 0.
This is a 4-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be
specified for the whole port using pull-up resistor option
register 0 (PU0).
P10, P11I/OPort 1.
This is a 2-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be
specified for the whole port using pull-up resistor option
register 0 (PU0).
P20SCK10
P21SO10
P22
P40 to P43I/OPort 4.
P60TO40
P61
P80 to P85I/OPort 8.
I/OPort 2.
This is a 3-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be
specified in 1-bit units using pull-up resistor option regi s ter 2
(PUB2).
This is a 4-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be
specified for the whole port using pull-up resistor option
register 0 (PU0), or key ret urn mode register 00 (KRM00).
I/OPort 6.
This is a 2-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
This is a 6-bit I/O port.
Input/output can be spec i f i ed i n 1-bi t units.
Input
Input
Input
SI10
InputKR00 to KR03
Input
INT
Low-level
output
S22 to S17
−
−
Preliminary Product Information U14411EJ1V0PM00
9
µµµµ
PD78F9328
3.2
Non-Port Pins
Pin NameI/OFunctionAf ter ResetAlternate Function
INTInputExternal interrupt input f or whi ch the valid edge (rising edge,
falling edge, or both rising and falling edges) can be specified.
KR00 to KR03InputKey return signal detectionInputP40 to P43
TO40Output8-bit timer 40 outputInputP60
SCK10I/OSerial cl ock input/output of serial i nterface 10InputP20
SI10InputSerial data input of serial i nt erface 10InputP22
SO10OutputSerial data out put of serial interface 10InputP21
S0 to S16
S17 to S22P85 to P80
S23
COM0 to COM3OutputLCD controller/driver common si gnal out putsLow-level
LC0
V
X1Input
X2
XT1Input
XT2
RESETInputSystem reset inputInput
DD
V
SS
V
PP
V
OutputLCD controller/driver segment signal outputsLow-level
LCD drive voltage
−
Connecting crystal res onator for main system clock oscillation
−
Connecting crystal res onator for subsystem clock oscillation
−
Positive power supply
−
Ground potential
−
Flash memory programming mode setting.
−
High-voltage application for program write/verify.
In normal operation mode, connect di rectly to V
SS
.
InputP61
output
output
−−
−−
−−
−−
−−
−−
−−
−−
−
−
−
−
10
Preliminary Product Information U14411EJ1V0PM00
3.3 Pin I/O Circuits and Recommended Connection of Unused Pins
The I/O circuit type of each pin and recommended connection of unused pins is shown in Table 3-1.
For the input/output circuit configuration of each type, refer to Figure 3-1.
Table 3-1. Types of Pin I/O Circuits and Recommended Connection of Unused Pins
Pin NameI/O Ci rcuit TypeI/ORecommend Connection of Unused Pi ns
P00 to P03
P10, P11
5-A
I/OInput: Independently connec t to V
Output: Leave open.
P20/SCK108-A
P21/SO105-A
P22/SI10
8-A
P40/KR00 to P43/KR03
P60/TO405
P61/INT8
P80/S22 to P85/S1717-G
S0 to S16, S2317-D
Output
Leave open.
COM0 to COM318-B
LC0
V
−
−
XT1InputConnect to VSS.
XT2
−
Leave open.
RESET2Input
PP
V
−−
Connect directly to V
SS
.
DD
or VSS via a resistor.
−
µµµµ
PD78F9328
Figure 3-1. I/O Circuit Type (1/2)
Type 2Type 5
IN
Output
disable
Schmitt-triggered input with hysteresis characteristics.
Input
enable
Data
V
DD
P-ch
IN/OUT
N-ch
V
SS
Preliminary Product Information U14411EJ1V0PM00
11
Figure 3-1. I/O Circuit Type (2/2)
Type 5-AType 8
V
DD
µµµµ
PD78F9328
Pull-up
enable
Data
Output
disable
V
SS
V
DD
P-ch
N-ch
P-ch
IN/OUT
Data
Output
disable
Input
enable
Type 8-AType 17-D
DD
V
V
Pull-up
enable
Data
V
DD
P-ch
P-ch
VLC3
SEG
IN/OUT
Output
disable
N-ch
V
SS
V
LC0
data
LC2
P-ch
P-ch
N-ch
N-ch
P-ch
N-ch
V
DD
P-ch
IN/OUT
N-ch
V
SS
P-ch
OUT
N-ch
Type 17-GType 18-B
DD
V
Data
P-ch
IN/OUT
Output
disable
N-ch
VSS
Input
enable
LC0
V
VLC1
P-ch
P-ch
N-ch
P-ch
COM
data
V
SEG
data
N-ch
V
LC2
P-ch
N-ch
N-ch
V
SS
SS
V
V
LC0
LC1
V
P-ch
P-ch
N-ch
P-ch
N-ch
OUT
P-ch
LC2
N-ch
P-ch
N-ch
N-ch
V
SS
Remark
12
V
LC1
: V
LC0
× 2/3, V
LC2
LC0
: V
/3
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
4. CPU ARCHITECTURE
4.1 Memory Space
The µPD78F9328 is provided with 64 Kbytes of accessible memory space. Figure 4-1 shows the memory map.
Figure 4-1. Memory Map
F F F F H
Special function registers
256 × 8 bits
F F 0 0 H
F E F F H
Internal high-speed RAM
512 × 8 bits
F D 0 0 H
Data memory
space
F C F F H
F A 1 8 H
F A 1 7 H
F A 0 0 H
F 9 F F H
8 0 0 0 H
7 F F F H
Reserved
LCD display RAM
24 × 8 bits
7 F F F H
Reserved
Program
memory space
0 0 0 0 H
Flash memory
32 K × 8 bits
0 0 8 0 H
0 0 7 F H
0 0 4 0 H
0 0 3 F H
0 0 1 4 H
0 0 1 3 H
0 0 0 0 H
Program area
CALLT table area
Program area
Vector table area
Preliminary Product Information U14411EJ1V0PM00
13
µµµµ
PD78F9328
4.2 Data Memory Addressing
The µPD78F9328 is provided with a variety of addressing modes to improve the operability of the memory. In the
area that incorporates data memory (FD00H to FFFFH) in particular, specific addressing modes that correspond to
the particular functions of an area, such as the special function registers (SFRs), are available. Figure 4-2 shows the
data memory addressing modes.
Figure 4-2. Data Memory Addressing Modes
F F F F H
Special function registers (SFRs)
256 × 8 bits
F F 2 0 H
F F 1 F H
F F 0 0 H
F E F F H
SFR addressing
F E 2 0 H
F E 1 F H
F D 0 0 H
F C F F H
F A 1 8 H
F A 1 7 H
F A 0 0 H
F 9 F F H
8 0 0 0 H
7 F F F H
Internal high-speed RAM
512 × 8 bits
Reserved
LCD display RAM
24 × 8 bits
Reserved
Flash memory
32 K × 8 bits
Short direct
addressing
Direct addressing
Register indirect
addressing
Based addressing
14
0 0 0 0 H
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
4.3 Processor Registers
4.3.1 Control registers
(1) Program counter (PC)
The PC is a 16-bit register that holds the address information of the next program to be executed.
The PSW is an 8-bit register that indicates the status of the CPU according to the results of instruction execution.
Figure 4-4. Program Status Word Configuration
70
IEZ0AC001CY
015
(a) Interrupt enable flag (IE)
This flag controls the interrupt request acknowledgement of the CPU.
(b) Zero flag (Z)
This flag is set (1) if the result of an operation is zero; otherwise it is reset (0).
(c) Auxiliary carry flag (AC)
AC is set (1) if the result of the operation has a carry from bit 3 or a borrow at bit 3; otherwise it is reset (0).
(d) Carry flag (CY)
CY is used to indicate whether an overflow or underflow has occurred during the execution of a subtract or
add instruction.
(3) Stack pointer (SP)
The SP is a 16-bit register that holds the start address of the stack area. Only the internal RAM area (FD00H to
FEFFH) can be specified as the stack area.
Caution RESET input makes the SP contents undefined, so be sure to initialize the SP before instruction
execution.
Preliminary Product Information U14411EJ1V0PM00
15
µµµµ
PD78F9328
4.3.2 General-purpose registers
PD78F9328 has eight 8-bit general-purpose registers (X, A, C, B, E, D, L, and H).
The
µ
These registers can be used either singly as 8-bit registers or in pairs as 16-bit registers (AX, BC, DE, and HL),
and can be described in terms of function names (X, A, C, B, E, D, L, H, AX, BC, DE, and HL) and absolute names
(R0 to R7 and RP0 to RP3).
Special function registers are used as peripheral hardware mode registers and control registers, and are mapped
in the 256-byte space from FF00H to FFFFH.
Note that the bit number of a bit name that is a reserved word in the RA78K0S and defined under the header file
“sfrbit.h” in the CC78K0S appears enclosed in a circle in the register formats. Refer to the register formats in
PERIPHERAL HARDWARE FUNCTIONS
.
Table 4-1. Special Function Registers (1/2)
5.
FF00H Port 0P0
FF01H Port 1P1
FF02H Port 2P2
FF03H port 4P4
FF05H Port 6P6
FF08H Port 8P8
FF20H Port mode regi ster 0PM0
FF21H Port mode regi ster 1PM1
FF22H Port mode regi ster 2PM2
FF24H Port mode regi ster 4PM4
FF26H Port mode regi ster 6PM6
FF28H Port mode regi ster 8PM8
FF32H Pull-up res i s tor option register B2PUB2
FF4AH Wat ch timer mode control registerWTM
FF58H Port func tion register 8PF8
FF63H 8-bit com pare regi ster 30CR30W
FF64H 8-bit tim er c ounter 30TM30R
FF65H 8-bit ti m er m ode control register 30TMC30R/W
FF66H 8-bit com pare regi ster 40CR40
FF67H 8-bit H wi dth compare register 40CRH40
FF68H 8-bit tim er c ounter 40TM40R
FF69H 8-bit ti m er m ode control register 40TMC40R/W
FF6AH Carrier generator output control register 40TCA40W
FF72H Serial operat i on m ode regi ster 10CSIM10
FF74H Transmis sion/reception shift register 10SIO10
FFB0H LCD display mode register 0LCDM0
FFB2H LCD clock control register 0LCDC0
FFDDH Power-on-cl ear regi ster 1POCF1
R/W
W
R/W
Bit Unit for Manipulati onAddressSpecial Function Regist er (SFR) NameS ymbolR/W
1 Bit8 Bits16 Bits
This value is 04H only after a power-on-clear reset.
Note
Preliminary Product Information U14411EJ1V0PM00
17
Table 4-1. Special Function Registers (2/2)
µµµµ
PD78F9328
FFE0H Interrupt request flag register 0IF0
FFE4H Interrupt mask flag register 0MK0
FFECH External interrupt m ode regi ster 0INTM0
FFF0H Subclock oscillation mode registerSCKM
FFF2H Subclock control registerCSS
FFF5H Key return mode register 00KRM00
FFF7H Pull-up resistor option register 0PU0
FFF9H Watchdog timer mode registerWDTM
FFFAH Oscillation stabilization time selection registerOSTS
FFFBH Processor clock control registerPCC
Bit Unit for Manipulati onAddressSpecial Function Regist er (SFR) NameS ymbolR/ W
1 Bit8 Bits16 Bits
R/W
√√−
√√−
−√−
√√−
√√−
√√−
√√−
√√−
−√−
√√−
After
Reset
00H
FFH
00H
04H
02H
18
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
5. PERIPHERAL HARDWARE FUNCTIONS
5.1 Ports
5.1.1 Port functions
Various kinds of control operations are possible using the ports provided in the
illustrated in Figure 5-1 and their functions are listed in Table 5-1.
A number of alternate functions are also provided, except for those ports functioning as digital I/O ports. Refer to
3. PIN FUNCTIONS
for details of the alternate function pins.
Figure 5-1. Ports
PD78F9328. These ports are
µ
Port 4
Port 6
Port 8
P40
P43
P60
P61
P80
P85
P00
P03
P10
P11
P20
P22
Port 0
Port 1
Port 2
Preliminary Product Information U14411EJ1V0PM00
19
Table 5-1. Port Functions
Port NamePin NameFunction
Port 0P00 to P03This is an I/O port f or whi ch input and output can be specified i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be specifi ed using pull-up
resistor option register 0 (PU0).
Port 1P10, P11This is an I/O port for whi ch input and output can be specifi ed i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be specifi ed using pull-up
resistor option register 0 (PU0).
Port 2P20 to P22This is an I/O port f or whi ch input and output can be specified i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be specifi ed using pull-up
resistor option register B2 (PUB2).
Port 4P40 to P43This is an I/O port f or whi ch input and output can be specified i n 1-bi t units.
When used as an input port, on-chip pull -up resistors can be specifi ed using pull-up
resistor option register 0 (PU0), or key return mode register 00 (KRM 00).
Port 6P60, P61This is an I/O port for whi ch input and output can be specifi ed i n 1-bi t units.
Port 8P80 to P85This is an I/O port f or whi ch input and output can be specified i n 1-bi t units.
µµµµ
PD78F9328
20
Preliminary Product Information U14411EJ1V0PM00
5.1.2 Port configuration
The ports consist of the following hardware.
Table 5-2. Port Configuration
ItemConfiguration
Control registersPort mode registers (PMm: m = 0 to 2, 4, 6, 8)
Pull-up resistor option registers (PU0, PUB2)
Port function regist er 8 (P F8)
PortsTotal: 21 (CMOS I/O: 21)
Pull-up resistorsTotal: 13 (software control: 13)
Figure 5-2. Basic Configuration of CMOS Port
WR
PUm
µµµµ
PD78F9328
DD
V
Internal bus
WR
WR
WR
PU×
PORTm
Selector
PORTm
Output latch
Pmn
PMm
PMmn
P-ch
Pmn
Caution Figure 5-2 shows the basic configuration of a CMOS I/O port. This configuration differs
depending on the functions of alternate function pins. Also, an on-chip pull-up resistor can be
connected to port 4 by means of a setting in key return mode register 00 (KRM00).
Remark
PU×: Pull-up resistor option register (× = 0, B2)
PMmn: Bit n of port mode register m (m = 0 to 2, 4, 6, 8 n = 0 to 5)
Pmn: Bit n of port m
RD: Port read signal
WR: Port write signal
Preliminary Product Information U14411EJ1V0PM00
21
5.1.3 Port function control registers
The ports are controlled by the following three types of registers.
Port mode registers (PM0 to PM2, PM4, PM6, PM8)
•
Pull-up resistor option registers (PU0, PUB2)
•
Port function register 8 (PF8)
•
(1) Port mode registers (PM0 to PM2, PM4, PM6, PM8)
Input and output can be specified in 1-bit units.
These registers can be set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets these registers to FFH.
When using the port pins as their alternate functions, set the output latch as shown in Table 5-3.
Caution Because P61 functions alternately as an external interrupt input, when the output level
changes after the output mode of the port function is specified, the interrupt request flag will
be inadvertently set. Therefore, be sure to preset the interrupt mask flag (PMK0) before
using the port in output mode.
µµµµ
PD78F9328
Figure 5-3. Port Mode Register Format
Symbol76543210AddressAfter resetR/W
PM01111PM03PM02PM01PM00FF20HFFHR/W
PM1111111PM11PM10FF21HFFHR/W
PM211111PM22PM21PM20FF22HFFHR/W
PM41111PM43PM42PM41PM40FF24HFFHR/W
PM6111111PM61PM60FF26HFFHR/W
PM811PM85PM84PM83PM82PM81PM80FF28HFFHR/W
PMmnPmn pin input/output mode s el ection
(m = 0 to 2, 4, 6, 8 n = 0 to 5)
0Output mode (output buffer on)
1Input mode (output buffer off )
22
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
Table 5-3. Port Mode Registers and Output Latch Settings When Using Alternate Functions
Alternate FunctionPin Name
NameI/O
P20SCK10
P21SO10Output01
P22SI10Input1
P40 to P43KR00 to KR03Input1
P60TO40Output00
P61INTInput1
P80 to P85
Note
Remark
S22 to S17
When using P80 to P85 pins as S22 to S17, set port function register 8 (PF8) to 3FH.
: don’t care
×
Note
Input1
Output01
Output
PM
××
××
P
PM××: Port mode register
P××: Port output latch
(2) Pull-up resistor option register 0 (PU0)
This register sets whether to use on-chip pull-up resistors for ports 0, 1, and 4 on a port by port basis. An onchip pull-up resistor can be used only for those bits set to the input mode of a port for which the use of the onchip pull-up resistor has been specified using PU0.
For those bits set to the output mode, on-chip pull-up resistors cannot be used, regardless of the setting of
PU0. This also applies to alternate-function pins used as output pins.
PU0 is set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 00H.
××
×
×
×
×
Figure 5-4. Format of Pull-Up Resistor Option Register 0
Symbol765<4>32<1><0>AddressAfter resetR/W
PU0000PU0400PU01PU00FFF7H00HR/W
PU0mPort m on-chip pull-up resistor selection
(m = 0, 1, 4)
0An on-chip pull-up resistor is not connected
1An on-chip pull-up resistor is connected
Caution Always set bits 2, 3, and 5 to 7 to 0.
Preliminary Product Information U14411EJ1V0PM00
23
µµµµ
PD78F9328
(3) Pull-up resistor option register B2 (PUB2)
This register sets whether to use on-chip pull-up resistors for P20 to P22 in bit units. An on-chip pull-up
resistor can be used only for those bits set to the input mode of a port for which the use of the on-chip pull-up
resistor has been specified using PUB2.
For those bits set to the output mode, on-chip pull-up resistors cannot be used, regardless of the setting of
PUB2. This also applies to alternate-function pins used as output pins.
PUB2 is set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 00H.
Figure 5-5. Format of Pull-Up Resistor Option Register B2
Symbol76543<2><1><0>AddressAfter resetR/W
PUB200000PUB22PUB21PUB20FF32H00HR/W
PUB2nP2n on-chip pull-up resistor s el ection
(n = 0 to 2)
0An on-chip pull-up resistor is not connected
1An on-chip pull-up resistor is connected
Caution Always set bits 3 to 7 to 0.
(4) Port function register 8 (PF8)
This register sets the port function of port 8 in 1-bit units.
The pins of port 8 are selected as either LCD segment signal outputs or general-purpose port pins according
to the setting of PF8.
PF8 can be set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 00H.
Figure 5-6. Format of Port Function Register 8
Symbol76543210AddressAfter resetR/W
PF800PF85PF84PF83PF82PF81PF80FF58H00HR/W
PF8nP8n port function (n = 0 to 5)
0Operates as a general-purpose port
1Operates as an LCD segment signal output
24
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
5.2 Clock Generator
5.2.1 Clock generator function
The clock generator generates the clock pulse to be supplied to the CPU and peripheral hardware.
There are two types of system clock oscillators:
Main system clock oscillator (ceramic/crystal resonator)
•
This circuit generates a frequency of 1.0 to 5.0 MHz. Oscillation can be stopped by executing the STOP
instruction or by means of a processor clock control register (PCC) setting.
Subsystem clock oscillator
•
This circuit generates a frequency of 32.768 kHz. Oscillation can be stopped using the subclock oscillation
mode register (SCKM).
5.2.2 Clock generator configuration
The clock generator consists of the following hardware.
Table 5-4. Clock Generator Configuration
ItemConfiguration
Control registersProcessor clock control register (PCC)
Subclock oscillation mode register (SCKM)
Subclock control register (CSS)
OscillatorsMain system clock oscillator
Subsystem clock oscillator
Preliminary Product Information U14411EJ1V0PM00
25
Internal bus
Figure 5-7. Clock Generator Block Diagram
µµµµ
PD78F9328
XT1
XT2
X1
X2
FRC
SCC
Subsystem
clock
oscillatior
Main system
clock
oscillator
STOP
Subclock oscillation mode
register (SCKM)
f
XT
X
f
MCC
PCC1
1/2
Watch timer
LCD controller/driver
Prescaler
f
X
2
2
f
XT
2
Standby
control
circuit
Clock to peripheral hardware
Wait
control
circuit
CPU clock
CPU
)
(f
Selector
CLS
CSS0
Processor clock control
register (PCC)
Subclock control
register (CSS)
Internal bus
26
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
5.2.3 Clock generator control registers
The clock generator is controlled by the following three registers.
Processor clock control register (PCC)
•
Subclock oscillation mode register (SCKM)
•
Subclock control register (CSS)
•
(1) Processor clock control register (PCC)
This register is used to select the CPU clock and set the frequency division ratio.
PCC is set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 02H.
Figure 5-8. Format of Processor Clock Control Register
Symbol<7>6543210AddressAfter resetR/W
PCCMCC00000PCC10FFFBH02HR/W
MCCMain system clock oscillator operation control
0Operation enabled
1Operation stopped
CPU
CSS0PCC1
00f
01
1×f
The CPU clock is selected by a combination of flag settings in the PCC and CSS registers. (Refer to
Note
X
X
f
XT
CPU clock (f
(0.2 µs)0.4 µs
/22 (0.8 µs)
/2 (61 µs)122 µs
) selection
5.2.3 (3) Subclock control register (CSS)
Note
Minimum instructi on execution time: 2f
1.6
s
µ
.)
Cautions 1. Always set bits 0 and 2 to 6 to 0.
2. MCC can be set only when the subsystem clock is selected as the CPU clock. Setting
MCC to 1 while the main system clock is operating is invalid.
X
: Main system clock oscillation frequency
Remarks 1.
f
fXT: Subsystem clock oscillation frequency
2.
The parenthesized values apply to operation at fX = 5.0 MHz or fXT = 32.768 kHz.
3.
CPU
Preliminary Product Information U14411EJ1V0PM00
27
µµµµ
PD78F9328
(2) Subclock oscillation mode register (SCKM)
This register is used to select a feedback resistor for the subsystem clock and control the oscillation of the
clock.
SCKM is set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 00H.
Figure 5-9. Format of Subclock Oscillation Mode Register
Symbol7654321<0>AddressAfter res etR/W
SCKM000000FRCSCCFFF0H00HR/W
FRCF eedback resistor selecti on
0An on-chip feedback resis t or i s used
1An on-chip feedback resis t or i s not used
SCCControl of subsystem clock oscillator operation
0Operation enabled
1Operation stopped
Caution Always set bits 2 to 7 to 0.
28
Preliminary Product Information U14411EJ1V0PM00
µµµµ
PD78F9328
(3) Subclock control register (CSS)
This register is used to specify whether the main system or subsystem clock oscillator is selected and to
indicate the operating status of the CPU clock.
CSS is set using a 1-bit or 8-bit memory manipulation instruction.
RESET input sets this register to 00H.
Figure 5-10. Format of Subclock Control Register
Symbol76543210AddressAfter resetR/W
Note
CSS00CLSCSS00000FFF2H00H
CLSCPU clock operating status
0Operating on the output of the (divi ded) main system clock
1Operating on the output of the subsystem clock
CSS0Selection of main system clock or subsystem clock oscillator
0Main system clock oscillator (divided) output
1Subsystem clock oscillator output
R/W
Bit 5 is read-only.
Note
Caution Always set bits 0 to 3, 6, and 7 to 0.
Preliminary Product Information U14411EJ1V0PM00
29
5.3 8-Bit Timer 30, 40
5.3.1 Functions of 8-bit timer 30, 40
The 8-bit timer in the
table are possible by means of mode register settings.
PD78F9328 has 2 channels (timer 30 and timer 40). The operation modes in the following