For the information for microcontroller supports, see the following website.
http://edevice.fujitsu.com/micom/en-support/
FUJITSU SEMICONDUCTOR LIMITED
PREFACE
■ The Purpose and Intended Readership of This Manual
Thank you very much for your continued special support for Fujitsu Semiconductor products.
The MB95630H Series is a line of products developed as general-purpose products in the New
8FX family of proprietary 8-bit single-chip microcontrollers applicable as application-specific
integrated circuits (ASICs). The MB95630H Series can be used for a wide range of
applications from consumer products including portable devices to industrial equipment.
Intended for engineers who actually develop products using the MB95630H Series of
microcontrollers, this manual describes its functions, features, and operations. You should read
through the manual.
This manual is written to explain the respective configurations and operations of peripheral
functions, but not to provide specifications of a device.
For detailed specifications of a device, refer to its data sheet.
2
MC-8FX Programming Manual".
■ Trademark
For details on individual instructions, refer to "F
2
Note: F
The company names and brand names in this document are the trademarks or registered
trademarks of their respective owners.
MC is the abbreviation of FUJITSU Flexible Microcontroller.
■ Sample Programs
Fujitsu Semiconductor provides sample programs free of charge to operate the peripheral
resources of the New 8FX family of microcontrollers. Feel free to use such sample programs to
check the operational specifications and usages of Fujitsu microcontrollers.
Note that sample programs are subject to change without notice. As these pieces of software
are offered to show standard operations and usages, evaluate them sufficiently before use with
your system. Fujitsu Semiconductor assumes no liability for any damages whatsoever arising
out of the use of sample programs.
i
How to Use This Manual
■ Finding a Function
The following methods can be used to search for details of a function in this manual:
•Searching from CONTENTS
CONTENTS lists the contents in this manual in the order of description.
•Searching from registers
The address at which a register is located is not mentioned in this manual. To check the
address of a register, refer to "■ I/O MAP" in the device data sheet.
■ Chapters
This manual explains one peripheral function in one chapter.
■ Terminology
This manual uses the following terminology.
Te r mExplanation
Wor dIndicates an access in unit of 16 bits.
ByteIndicates an access in unit of 8 bits.
■ Notations
The notations in "■ Register Configuration" in this manual are explained below:
•bit: bit number
•Field: bit field name
•Attribute: Attributes for read access and write access of each bit
- R: Read-only
- W: Write-only
- R/W: Readable/Writable
- —: Undefined
•Initial value: Initial value of a bit after a reset
- 0: The initial value is "0".
- 1: The initial value is "1".
- X: The initial value is undefined.
Multiple bits are indicated in this manual in the following way.
- Example 1: bit7:0 represents bit7 to bit0.
- Example 2: SCM[2:0] represents SCM2 to SCM0.
The values such as those indicating addresses are written in this manual in the following ways:
- Hexadecimal number: The prefix "0x" is attached to the beginning of a value (e.g.:
0xFFFF).
- Binary number: The prefix "0b" is attached to the beginning of a value (e.g.: 0b1111).
- Decimal number: Only the number is used (e.g.: 1234).
In this manual, "n" in a pin name and a register abbreviation represents the channel number.
ii
• The contents of this document are subject to change without notice.
Customers are advised to consult with sales representatives before ordering.
• The information, such as descriptions of function and application circuit examples, in this document are presented
solely for the purpose of reference to show examples of operations and uses of FUJITSU SEMICONDUCTOR
device; FUJITSU SEMICONDUCTOR does not warrant proper operation of the device with respect to use based
on such information. When you develop equipment incorporating the device based on such information, you must
assume any responsibility arising out of such use of the information. FUJITSU SEMICONDUCTOR assumes no
liability for any damages whatsoever arising out of the use of the information.
• Any information in this document, including descriptions of function and schematic diagrams, shall not be
construed as license of the use or exercise of any intellectual property right, such as patent right or copyright, or
any other right of FUJITSU SEMICONDUCTOR or any third party or does FUJITSU SEMICONDUCTOR
warrant non-infringement of any third-party's intellectual property right or other right by using such information.
FUJITSU SEMICONDUCTOR assumes no liability for any infringement of the intellectual property rights or other
rights of third parties which would result from the use of information contained herein.
• The products described in this document are designed, developed and manufactured as contemplated for general
use, including without limitation, ordinary industrial use, general office use, personal use, and household use, but
are not designed, developed and manufactured as contemplated (1) for use accompanying fatal risks or dangers
that, unless extremely high safety is secured, could have a serious effect to the public, and could lead directly to
death, personal injury, severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility,
aircraft flight control, air traffic control, mass transport control, medical life support system, missile launch control
in weapon system), or (2) for use requiring extremely high reliability (i.e., submersible repeater and artificial
satellite). Please note that FUJITSU SEMICONDUCTOR will not be liable against you and/or any third party for
any claims or damages arising in connection with above-mentioned uses of the products.
• Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss
from such failures by incorporating safety design measures into your facility and equipment such as redundancy,
fire protection, and prevention of over-current levels and other abnormal operating conditions.
• Exportation/release of any products described in this document may require necessary procedures in accordance
with the regulations of the Foreign Exchange and Foreign Trade Control Law of Japan and/or US export control
laws.
• The company names and brand names herein are the trademarks or registered trademarks of their respective
owners.
A change on a page is indicated by a vertical line drawn on the left of that page.
PageRevisions (For details, see their respective pages.)
iiHow to Use This Manual
■ Finding a Function
—CHAPTER 1 NOTES ON DEVICE
HANDLING
21CHAPTER 3 CLOCK
CONTROLLER
3.1 Overview
■ Standby Mode
223.1 Overview
■ Combinations of Clock Mode
and Standby Mode
Table 3.1-3
233.1 Overview
■ Combinations of Clock Mode
and Standby Mode
Table 3.1-4
333.3.4 Standby Control Register
(STBC)
■ Register Functions
Added the following section.
•Searching from registers
Deleted the entire chapter from the hardware manual.
For details of device handling, refer to "■ PRECAUTIONS
FOR DEVICE HANDLING", "■ NOTES ON DEVICE
HANDLING" and "■ PIN CONNECTION" in the device
data sheet.
Added the following statement.
In every standby mode, two further operating mode options,
normal standby mode and deep standby mode, can be
selected by the deep standby mode control bit in the standby
control register 2 (STBC2:DSTBYX).
Revised the internal operating states of the Flash memory
and RAM.
Added note *6.
Revised the internal operating states of the Flash memory
and RAM.
Added note *6.
Corrected the following heading in the bit function table of
the TMD bit.
In main clock mode or main CR clock mode
→
In main clock mode, main CR clock mode or main CR PLL
clock mode
533.5.5 Watch Mode
■ Operations in Watch Mode
● Release from Watch Mode
82CHAPTER 6 I/O PORT
6.1 Overview
■ Overview
Table 6.1-1
836.2 Configuration and Operations of
I/O Port
■ Configuration of I/O Port
846.2 Configuration and Operations of
I/O Port
■ Operations of I/O Port
● Operation as an input port
Added the following statement at the end of the section.
However, if a program is being executed on the RAM, no
Flash recovery wait time occurs.
Added details of the A/D input disable register (upper).
Added the following note for the A/D input disable register
(upper) and the A/D input disable register (lower).
Refer to "■ I/O MAP" in the device data sheet for the
availability of the A/D input disable register (upper) and A/D
input disable register (lower).
Added A/D input disable register (upper) (AIDRH).
Revised the following statement.
When using an analog input shared pin as an input port, set
the corresponding bit in the A/D input disable register
(lower) (AIDRL) to "1".
→
When using an analog input shared pin as an input port, set
the corresponding bit in the A/D input disable register
(upper/lower) (AIDRH/AIDRL) to "1".
xiii
PageRevisions (For details, see their respective pages.)
856.2 Configuration and Operations of
I/O Port
■ Operations of I/O Port
● Operation as an analog input pin
108CHAPTER 8 HARDWARE/
SOFTWARE WATCHDOG
TIMER
8.4.1 Watchdog Timer Control
Register (WDTC)
■ Register Functions
152CHAPTER 11 8/16-BIT
COMPOSITE TIMER
11.10 Operation of PWM Timer
Function (Variable-cycle
Mode)
■ Operation of PWM Timer Func-
tion (Variable-cycle Mode)
Figure 11.10-1
16211.14.1 8/16-bit Composite Timer
Status Control Register 0
(Tn0CR0/Tn1CR0)
■ Register Functions
Revised the following statement.
Set the bit in the DDRx register corresponding to the analog
input pin to "0" and the bit corresponding to that pin in the
AIDRL register to "0".
→
Set the bit in the DDRx register corresponding to the analog
input pin to "0" and the bit corresponding to that pin in the
AIDRH/AIDRL register to "0".
Revised details of "Writing "0101"" of the WTE[3:0] bits in
the bit function table.
Corrected the following register names.
T00DR → Tn0DR
T01DR → Tn1DR
Corrected the bit number in the title of details of the F[3:0]
bits.
[bit3] → [bit3:0]
21.6.8 16-bit MPG Timer Control
Status Register (TCSR)
■ Register Functions
Corrected the name of the CMDR[7:0] bits.
Analog input pin select bits → Clock monitoring data bits
Added the following statement to details of the PIE0 bit.
In 16-bit PPG mode, use this bit to control the interrupt
request of the 8/16-bit PPG.
Revised the initial value of the DC06 bit.
1 → 0
Corrected the following register abbreviation.
TMR1 → TMRHn/TMRLn
Corrected the abbreviation of the compare clear interrupt
request flag bit.
PDIF → ICLR
xiv
PageRevisions (For details, see their respective pages.)
481CHAPTER 22 UART/SIO
22.7UART/SIO Serial Status and
Data Register (SSRn)
■ Register Functions
514
CHAPTER 24 I
2
C BUS
INTERFACE
2
24.7.1 I
C Bus Control Register 0
(IBCR0n)
517
CHAPTER 24 I
2
C BUS
INTERFACE
24.7.2 I
2
C Bus Control Register 1
(IBCR1n)
597CHAPTER 27 COMPARATOR
27.6.1 Comparator Control Register (CMR0C)
■ Register Functions
Corrected the following register abbreviation in the
respective details of the PER bit, the OVE bit and the FER
bit.
SMR2n → SMC2n
Revised the summary of this section.
Revised the summary of this section.
Revised the initial value of the IF bit.
X → 0
xv
xvi
CHAPTER 1
MEMORY ACCESS MODE
This chapter describes the memory access
mode.
1.1Memory Access Mode
MN702-00009-1v0-EFUJITSU SEMICONDUCTOR LIMITED1
CHAPTER 1 MEMORY ACCESS MODE
Address
0xFFFD
Data
0x00
Other than 0x00 Reserved. Do not set mode data to any value other than 0x00.
Selectssingle-chip mode.
Operation
bit7bit6bit5bit4bit3bit2bit1bit0
1.1 Memory Access Mode
MB95630H Series
1.1Memory Access Mode
The MB95630H Series supports only one memory access mode: single-chip
mode.
■ Single-chip Mode
In single-chip mode, only the internal RAM and the Flash memory are used, and no external
bus access is executed.
● Mode data
Mode data is the data used to determine the memory access mode of the CPU.
The mode data address is fixed at "0xFFFD". Always set the mode data of the Flash memory to
"0x00" to select the single-chip mode.
Figure 1.1-1 Mode Data Settings
After a reset is released, the CPU fetches mode data first.
The CPU then fetches the reset vector after the mode data. It starts executing instructions from
the address set in the reset vector.
2FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-1v0-E
CHAPTER 2
CPU
This chapter describes the functions and
operations of the CPU.
2.1Dedicated Registers
2.2General-purpose Register
2.3Placement of 16-bit Data in Memory
MN702-00009-1v0-EFUJITSU SEMICONDUCTOR LIMITED3
CHAPTER 2 CPU
Initial value
0xFFFD
Program counter
Indicates the address of the current instruction.
0x0000Accumulator (A)
Temporary storage register for arithmetic operation and transfer
0x0000
Te mp or ary accumulator (T)
Performs arithmetic operations with the accumulator.
0x0000
Index register
Indicates an index address.
0x0000Extra pointer
Indicates a memory address.
0x0000Stack pointer
Indicates the current stack location.
0x0030Program status
Stores a register bank pointer,
a direct bank pointer, and a condition code.
16 bits
PS
SP
EP
IX
PC
THTL
AHAL
RPDPCCR
:
:
:
:
:
:
:
2.1 Dedicated Registers
MB95630H Series
2.1Dedicated Registers
The CPU has dedicated registers: a program counter (PC), two registers for
arithmetic operations (A and T), three address pointers (IX, EP, and SP), and the
program status (PS) register. Each of the registers is 16 bits long. The PS
register consists of the register bank pointer (RP), direct bank pointer (DP), and
condition code register (CCR).
■ Configuration of Dedicated Registers
The dedicated registers in the CPU consist of seven 16-bit registers. As for the accumulator (A)
and the temporary accumulator (T), using only the lower eight bits of the respective registers is
also supported.
Figure 2.1-1 shows the configuration of the dedicated registers.
Figure 2.1-1 Configuration of Dedicated Registers
■ Functions of Dedicated Registers
Program counter (PC)
●
● Accumulator (A)
4FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-1v0-E
The program counter is a 16-bit counter which contains the memory address of the instruction
currently executed by the CPU. The program counter is updated whenever an instruction is
executed or an interrupt or a reset occurs. The initial value set immediately after a reset is the
mode data read address (0xFFFD).
The accumulator is a 16-bit register for arithmetic operation. It is used for a variety of
arithmetic and transfer operations of data in memory or data in other registers such as the
temporary accumulator (T). The data in the accumulator can be handled either as word (16-bit)
data or byte (8-bit) data. For byte-length arithmetic and transfer operations, only the lower
eight bits (AL) of the accumulator are used with the upper eight bits (AH) left unchanged. The
initial value set immediately after a reset is "0x0000".
MB95630H Series
● Temporary accumulator (T)
The temporary accumulator is an auxiliary 16-bit register for arithmetic operation. It is used to
perform arithmetic operations with the data in the accumulator (A). The data in the temporary
accumulator is handled as word data for word-length (16-bit) operations with the accumulator
(A) and as byte data for byte-length (8-bit) operations. For byte-length operations, only the
lower eight bits (TL) of the temporary accumulator are used and the upper eight bits (TH) are
not used.
When a MOV instruction is used to transfer data to the accumulator (A), the previous contents
of the accumulator are automatically transferred to the temporary accumulator. When
transferring byte-length data, the upper eight bits (TH) of the temporary accumulator remain
unchanged. The initial value after a reset is "0x0000".
● Index register (IX)
The index register is a 16-bit register used to hold the index address. The index register is used
with a single-byte offset (-128 to +127). The offset value is added to the index address to
generate the memory address for data access. The initial value after a reset is "0x0000".
● Extra pointer (EP)
CHAPTER 2 CPU
2.1 Dedicated Registers
The extra pointer is a 16-bit register which contains the value indicating the memory address
for data access. The initial value after a reset is "0x0000".
● Stack pointer (SP)
The stack pointer is a 16-bit register which holds the address referenced when an interrupt or a
sub-routine call occurs and by the stack push and pop instructions. During program execution,
the value of the stack pointer indicates the address of the most recent data pushed onto the
stack. The initial value after a reset is "0x0000".
● Program status (PS)
The program status is a 16-bit control register. The upper eight bits consists of the register bank
pointer (RP) and direct bank pointer (DP); the lower eight bits consists of the condition code
register (CCR).
In the upper eight bits, the upper five bits consists of the register bank pointer used to contain
the address of the general-purpose register bank. The lower three bits consists of the direct
bank pointer which locates the area to be accessed at high-speed by direct addressing.
The lower eight bits consists of the condition code register (CCR) which consists of flags that
represent the state of the CPU.
The instructions that can access the program status are "MOVW A,PS" and "MOVW PS,A".
The register bank pointer (RP) and direct bank pointer (DP) in the program status register can
also be read from and written to by accessing the mirror address (0x0078).
Note that the condition code register (CCR) is a part of the program status register and cannot
be accessed independently.
Refer to the "F
2
MC-8FX Programming Manual" for details on using the dedicated registers.
The register bank pointer (RP) in bit15 to bit11 of the program status (PS)
register contains the address of the general-purpose register bank that is
currently in use and is translated into a real address when general-purpose
register addressing is used.
■ Configuration of Register Bank Pointer (RP)
Figure 2.1-2 shows the configuration of the register bank pointer.
Figure 2.1-2 Configuration of Register Bank Pointer
The register bank pointer contains the address of the register bank currently in use. The content
of the register bank pointer is translated into a real address according to the rule shown in
Figure 2.1-3.
Figure 2.1-3 Rule for Translation into Real Addresses in General-purpose Register Area
Fixed valueRP: UpperOp-code: Lower
Generated
address
“0” “0”
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
A15 A14 A13 A12 A11 A10 A9A8 A7A6 A5A4 A3A2 A1A0
“0” “0”“0”“0” “0”“1” R4R3 R2R1 R0b2b1b0
The register bank pointer specifies the register bank used as general-purpose registers in the
RAM area. There are a total of 32 register banks, which are specified by setting a value
between 0 and 31 in the upper five bits of the register bank pointer. Each register bank has
eight 8-bit general-purpose registers which are selected by the lower three bits of the op-code.
The register bank pointer allows the space from "0x0100" to "0x01FF"(max) to be used as a
general-purpose register area. However, certain products have restrictions on the size of the
area available for the general-purpose register area. The initial value of the register bank
pointer after a reset is "0x0000".
■ Mirror Address for Register Bank and Direct Bank Pointer
Values can be written to the register bank pointer (RP) and the direct bank pointer (DP) by
accessing the program status (PS) register with the "MOVW PS,A" instruction; the two
pointers can be read by accessing PS with the "MOVW A,PS" instruction. Values can also be
directly written to and read from the two pointers by accessing "0x0078", the mirror address of
The direct bank pointer (DP) in bit10 to bit8 of the program status (PS) register
specifies the area to be accessed by direct addressing.
■ Configuration of Direct Bank Pointer (DP)
Figure 2.1-4 shows the configuration of the direct bank pointer.
Figure 2.1-4 Configuration of Direct Bank Pointer
The area of "0x0000 to 0x007F" and that of "0x0090 to 0x047F" can be accessed by direct
addressing. Access to 0x0000 to 0x007F is specified by an operand regardless of the value in
the direct bank pointer. Access to 0x0090 to 0x047F is specified by the value of the direct bank
pointer and the operand.
Table 2.1-1 shows the relationship between the direct bank pointer (DP) and the access area;
Table 2.1-2 lists the direct addressing instructions.
Table 2.1-1 Direct Bank Pointer and Access Area
Direct bank pointer (DP[2:0])Operand-specified dirAccess area*
0bXXX (It does not affect mapping.)0x0000 to 0x007F0x0000 to 0x007F
0b000 (Initial value)0x0090 to 0x00FF0x0090 to 0x00FF
0b001
0b0100x0180 to 0x01FF
0b0110x0200 to 0x027F
0b1000x0280 to 0x02FF
0b1010x0300 to 0x037F
0b1100x0380 to 0x03FF
0b1110x0400 to 0x047F
*: The available access area varies among products. For details, refer to the device data sheet.
0x0080 to 0x00FF
0x0100 to 0x017F
MN702-00009-1v0-EFUJITSU SEMICONDUCTOR LIMITED7
CHAPTER 2 CPU
2.1 Dedicated Registers
Table 2.1-2 Direct Address Instruction List
MB95630H Series
Applicable instructions
CLRB dir:bit
SETB dir:bit
BBC dir:bit,rel
BBS dir:bit,rel
MOV A,dir
CMP A,dir
ADDC A,dir
SUBC A,dir
MOV dir,A
XOR A,dir
AND A,dir
OR A,dir
MOV dir,#imm
CMP dir,#imm
MOVW A,dir
MOVW dir,A
8FUJITSU SEMICONDUCTOR LIMITEDMN702-00009-1v0-E
CHAPTER 2 CPU
MB95630H Series
2.1 Dedicated Registers
2.1.3Condition Code Register (CCR)
The condition code register (CCR) in the lower eight bits of the program status
(PS) register consists of the bits (H, N, Z, V, and C) containing information
about the arithmetic result or transfer data and the bits (I, IL1, and IL0) used to
control the acceptance of interrupt requests.
■ Configuration of Condition Code Register (CCR)
Figure 2.1-5 Configuration of Condition Code Register (CCR)