All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Technology Corp. without notice. Please review the latest information published
by Renesas Technology Corp. through various means, including the Renesas Technology
Corp. website (http://www.renesas.com).
Rev.1.30
Revision Date: Apr 14, 2006
www.renesas.com
Keep safety first in your circuit designs!
1.
Renesas Technology Corp. puts the maximum effort into making semiconductor products
better and more reliable, but there is always the possibility that trouble may occur with
them. Trouble with semiconductors may lead to personal injury, fire or property damage.
Remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or (iii) prevention against any malfunction or mishap.
Notes regarding these materials
1.
These materials are intended as a reference to assist our customers in the selection of the
Renesas Technology Corp. product best suited to the customer's application; they do not
convey any license under any intellectual property rights, or any other rights, belonging to
Renesas Technology Corp. or a third party.
2.
Renesas Technology Corp. assumes no responsibility for any damage, or infringement of
any third-party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples contained in these materials.
3.
All information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these
materials, and are subject to change by Renesas Technology Corp. without notice due to
product improvements or other reasons. It is therefore recommended that customers contact Renesas Technology Corp. or an authorized Renesas Technology Corp. product distributor for the latest product information before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corp. assumes no responsibility for any damage, liability, or other
loss rising from these inaccuracies or errors.
Please also pay attention to information published by Renesas Technology Corp. by various means, including the Renesas Technology Corp. Semiconductor home page (http://
www.renesas.com).
4.
When using any or all of the information contained in these materials, including product
data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision on the applicability of the information
and products. Renesas Technology Corp. assumes no responsibility for any damage, liability or other loss resulting from the information contained herein.
5.
Renesas Technology Corp. semiconductors are not designed or manufactured for use in a
device or system that is used under circumstances in which human life is potentially at
stake. Please contact Renesas Technology Corp. or an authorized Renesas Technology
Corp. product distributor when considering the use of a product contained herein for any
specific purposes, such as apparatus or systems for transportation, vehicular, medical,
aerospace, nuclear, or undersea repeater use.
6.
The prior written approval of Renesas Technology Corp. is necessary to reprint or reproduce in whole or in part these materials.
7.
If these products or technologies are subject to the Japanese export control restrictions,
they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/
or the country of destination is prohibited.
8.
Please contact Renesas Technology Corp. for further details on these materials or the
products contained therein.
General Precautions in the Handling of MPU/MCU Products
The following usage notes are applicable to all MPU/MC U pr o duct s fr om R e nesas. For d et a il ed usa ge not es on the
products covered by this manual, refer to the relevant sections of the manu a l . If the descri pt ion s un der General
Precautions in the Handling of MPU/MCU Products and in the body of the manual differ from each other, the description
in the body of the manual takes precedence.
1. Handling of Unused Pins
Handle unused pins in accord with the directions given under Handling of Unused Pins in the manual.
The input pins of CMOS products are generally in the high-impedance state. In operation with an
unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of LSI, an
associated shoot-through current flows internally, and malfunctions occur due to the false
recognition of the pin state as an input signal become possible. Unused pins should be handled as
described under Handling of Unused Pins in the manual.
2. Processing at Power-on
The state of the product is undefined at the moment when power is supplied.
The states of internal circuits in the LSI are indeterminate and the states of register settings and pins
are undefined at the moment when power is supplied.
In a finished product where the reset signal is applied to the external reset pin, the states of pins are
not guaranteed from the moment when power is supplied until the reset process is completed.
In a similar way, the states of pins in a product that is reset by an on-chip power-on reset function
are not guaranteed from the moment when power is supplied until the power reaches the level at
which resetting has been specified.
3. Prohibition of Access to Reserved Addresses
Access to reserved addresses is prohibited.
The reserved addresses are provided for the possible future expansion of functions. Do not access
these addresses; the correct operation of LSI is not guaranteed if they are accessed.
4. Clock Signals
After applying a reset, only release the reset line after the operating clock signal has become stable.
When switching the clock signal during program execution, wait until the target clock signal has
stabilized.
When the clock signal is generated with an external resonator (or from an external oscillator) during
a reset, ensure that the reset line is only released after full stabilization of the clock signal. Moreover,
when switching to a clock signal produced with an external resonator (or by an external oscillator)
while program execution is in progress, wait until the target clock signal is stable.
5. Differences between Products
Before changing from one product to another, i.e. to one with a different type number, confirm that the
change will not lead to problems.
The characteristics of MPU/MCU in the same group but having different type numbers may differ
because of the differences in internal memory capacity and layout pattern. When changing to
products of different type numbers, implement a system-evaluation test for each of the products.
How to Use This Manual
1.Purpose and Target Readers
This manual is designed to provide the user with an understanding of the hardware functions and electrical
characteristics of the MCU. It is intended for users designing application systems incorporating the MCU. A basic
knowledge of electric circuits, logical circuits, and MCUs is necessary in order to use this manual.
The manual comprises an overview of the product; descriptions of the CPU, system control functions, peripheral
functions, and electrical characteristics; and usage notes.
Particular attention should be paid to the precautionary notes when using the manual. These notes occur
within the body of the text, at the end of each section, and in the Usage Notes section.
The revision history summarizes the locations of revisions and additions. It does not list all revisions. Refer
to the text of the manual for details.
The following documents apply to the R8C/18 Group, R8C/19 Group. Make sure to refer to the latest versions of these
documents. The newest versions of the documents listed may be obtained from the Renesas Technology Web site.
memory maps, peripheral function
specifications, electrical characteristics, timing
charts) and operation description
Note: Refer to the application notes for details on
using peripheral functions.
Software manual Description of CPU instruction setR8C/Tiny Series
Application noteInformation on using peripheral functions and
application examples
Sample programs
Information on writing programs in assembly
language and C
Renesas
technical update
Product specifications, updates on documents,
etc.
R8C/18 Group,
R8C/19 Group
Hardware Manual
Software Manual
Available from Renesas
Technology Web site.
REJ03B0124
This hardware
manual
REJ09B0001
2.Notation of Numbers and Symbols
The notation conventions for register names, bit names, numbers, and symbols used in this manual are described
below.
(1)Register Names, Bit Names, and Pin Names
Registers, bits, and pins are referred to in the text by symbols. The symbol is accompanied by the word
“register,” “bit,” or “pin” to distinguish the three categories.
Examples the PM03 bit in the PM0 register
P3_5 pin, VCC pin
(2)Notation of Numbers
The indication “b” is appended to numeric valu es given i n binary format. However, nothing is appended t o the
values of single bits. The indication “h” is appended to numeric values given in hexadecimal format. Nothing
is appended to numeric values given in decimal format.
Examples Binary: 11b
Hexadecimal: EFA0h
Decimal: 1234
3.Register Notation
The symbols and terms used in register diagrams are described below.
XXX Register
b7 b6 b5 b4 b3 b2 b1 b0
0
XXX0
XXX1
(b2)
(b3)
XXX4
XXX5
XXX6
XXX7
*1
SymbolAddressAfter Reset
XXXXXX00h
Bit NameBit Symbol
XXX bits
Nothing is assigned. If necessary, set to 0.
When read, the content is undefined.
Reserved bits
XXX bits
XXX bit
b1 b0
1 0: XXX
0 1: XXX
1 0: Do not set.
1 1: XXX
Set to 0.
Function varies according to the operating
mode.
0: XXX
1: XXX
Function
RW
RW
RW
RW
RW
WO
RW
RO
*2
*3
*4
*1
Blank: Set to 0 or 1 according to the application.
0: Set to 0.
1: Set to 1.
X: Nothing is assigned.
*2
RW: Read and write.
RO: Read only.
WO: Write only.
−: Nothing is assigned.
*3
• Reserved bit
Reserved bit. Set to specified value.
*4
• Nothing is assigned
Nothing is assigned to the bit. As the bit may be used for future functions, if necessary, set to 0.
• Do not set to a value
Operation is not guaranteed when a value is set.
• Function varies according to the operating mode.
The function of the bit varies with the peripheral function mode. Refer to the register diagram for information
on the individual modes.
4.List of Abbreviations and Acronyms
AbbreviationFull Form
ACIAAsynchronous Communication Interface Adapter
bpsbits per second
CRCCyclic Redundancy Check
DMADirect Memory Access
DMACDirect Memory Access Controller
GSMGlobal System for Mobile Communications
Hi-ZHigh Impedance
IEBusInter Equipment bus
I/OInput/Output
IrDAInfrared Data Association
LSBLeast Significant Bit
MSBMost Significant Bit
NCNon-Connection
PLLPhase Locked Loop
PWMPulse Width Modulation
SFRSpecial Function Registers
SIMSubscriber Identity Module
UARTUniversal Asynchronous Receiver/Transmitter
VCOVoltage Controlled Oscillator
Address RegisterSymbolPage
0080hTimer Z Mode Register TZMR118
0081h
0082h
0083h
0084hTimer Z Waveform Output Control RegisterPUM120
0085hPrescaler Z RegisterPREZ119
0086hTimer Z Secondary RegisterTZSC119
0087hTimer Z Primary RegisterTZPR119
0088h
0089h
008AhTimer Z Output Control RegisterTZOC120
008BhTimer X Mode RegisterTXMR104
008ChPrescaler X RegisterPREX105
008DhTimer X RegisterTX105
008EhTimer Count Source Set RegisterTCSS105,121
008Fh
0090hTimer C RegisterTC137
0091h
0092h
0093h
0094h
0095h
0096hExternal Input Enable RegisterINTEN85
0097h
0098hKey Input Enable RegisterKIEN91
0099h
009AhTimer C Control Register 0TCC0138
009BhTimer C Control Register 1TCC1139
009ChCapture, Compare 0 RegisterTM0137
009Dh
009EhCompare 1 RegisterTM1137
009Fh
00A0hUART0 Transmit/Receive Mode RegisterU0MR149
00A1hUART0 Bit Rate RegisterU0BRG148
00A2hUART0 Transmit Buffer RegisterU0TB148
00A3h
00A4hUART0 Transmit/Receive Control Register 0 U0C0150
00A5hUART0 Transmit/Receive Control Register 1 U0C1151
00A6hUART0 Receive Buffer RegisterU0RB148
00A7h
00A8hUART1 Transmit/Receive Mode RegisterU1MR149
00A9hUART1 Bit Rate RegisterU1BRG148
00AAhUART1 Transmit Buffer RegisterU1TB148
00ABh
00AChUART1 Transmit/Receive Control Register 0 U1C0150
00ADhUART1 Transmit/Receive Control Register 1 U1C1151
00AEhUART1 Receive Buffer RegisterU1RB148
00AFh
00B0hUART Transmit/Receive Control Register 2UCON151
00B1h
00B2h
00B3h
00B4h
00B5h
00B6h
00B7h
00B8h
00B9h
00BAh
00BBh
00BCh
00BDh
00BEh
00BFh
NOTE:
1. The blank regions, 0100h to 01AFh, and 01C0h to 02FFh
are reserved. Do not access locations in these regions.
Address RegisterSymbolPage
00C0hA/D RegisterAD166
00C1h
00C2h
00C3h
00C4h
00C5h
00C6h
00C7h
00C8h
00C9h
00CAh
00CBh
00CCh
00CDh
00CEh
00CFh
00D0h
00D1h
00D2h
00D3h
00D4hA/D Control Register 2ADCON2166
00D5h
00D6hA/D Control Register 0ADCON0165
00D7hA/D Control Register 1ADCON1165
00D8h
00D9h
00DAh
00DBh
00DCh
00DDh
00DEh
00DFh
00E0h
00E1hPort P1 RegisterP133
00E2h
00E3hPort P1 Direction RegisterPD133
00E4h
00E5hPort P3 RegisterP333
00E6h
00E7hPort P3 Direction RegisterPD333
00E8hPort P4 RegisterP433
00E9h
00EAhPort P4 Direction RegisterPD433
00EBh
00ECh
00EDh
00EEh
00EFh
00F0h
00F1h
00F2h
00F3h
00F4h
00F5h
00F6h
00F7h
00F8h
00F9h
00FAh
00FBh
00FChPull-Up Control Register 0PUR034
00FDhPull-Up Control Register 1PUR134
00FEhPort P1 Drive Capacity Control RegisterDRR34
00FFhTimer C Output Control RegisterTCOUT140
01B3hFlash Memory Control Register 4FMR4184
01B4h
01B5hFlash Memory Control Register 1FMR1183
01B6h
01B7hFlash Memory Control Register 0FMR0182
0FFFFh Optional Function Select RegisterOFS98,177
B - 2
R8C/18 Group, R8C/19 Group
REJ09B0222-0130
SINGLE-CHIP 16-BIT CMOS MCU
Apr 14, 2006
1.Overview
These MCUs are fabricated using a high-performance silicon gate CMOS process, embedding the
R8C/Tiny Series CPU core, and is packaged in a 20-pin molded-plastic LSSOP, SDIP or a 28-pin plastic
molded-HWQFN. It implements sophisticated instructions for a high level of instruction efficiency. With 1
Mbyte of address space, they are capable of executing instructions at high speed.
Furthermore, the R8C/19 Group has on-chip data flash ROM (1 KB × 2 blocks).
The difference between the R8C/18 Group and R8C/19 Group is only the presence or absence of data
flash ROM. Their peripheral functions are the same.
1.1Applications
Electric household appliances, office equipment, housing equipment (sensors, security systems), general
industrial equipment, audio equipment, etc.
Rev.1.30
Rev.1.30Apr 14, 2006Page 1 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group1. Overview
1.2Performance Overview
Table 1.1 outlines the Functions and Specifications for R8C/18 Group and Table 1.2 outlines the
Functions and Specifications for R8C/19 Group.
Table 1.1Functions and Specifications for R8C/18 Group
ItemSpecification
CPUNumber of fundamental
instructions
Minimum instruction execution
time
Operation modeSingle-chip
Address space1 Mbyte
Memory capacityRefer to Table 1.3 Product Information for R8C/18
Peripheral
Functions
Electric
Characteristics
Flash Memory
Operating Ambient Temperature-20 to 85°C
Package20-pin molded-plastic LSSOP
PortsI/O ports: 13 pins (including LED drive port)
Figure 1.6Pin Assignments for PWQN0028KA-B Package (Top View)
Rev.1.30Apr 14, 2006Page 9 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group1. Overview
1.6Pin Functions
Table 1.5 lists Pin Functions, Table 1.6 lists Pin Name Information by Pin Number of PLSP0020JB-A,
PRDP0020BA-A packages, and Table 1.7 lists Pin Name Information by Pin Number of PWQN0028KAB package.
Table 1.5Pin Functions
TypeSymbolI/O TypeDescription
Power supply input VCC
VSS
Analog power
supply input
Reset inputRESET
MODEMODEIConnect this pin to VCC via a resistor.
Main clock inputXINIThese pins are provided for main clock generation
Timer ZTZOUTOTimer Z output pin
Timer CTCINITimer C input pin
Serial interfaceCLK0I/OTransfer clock I/O pin
Reference voltage
input
ComparatorAN8 to AN11IAnalog input pins to comparator
I/O portP1_0 to P1_7, P3_3
Input portP4_2, P4_6, P4_7IInput-only ports
I: InputO: OutputI/O: Input and outpu t
AVCC, A VSSIPower supply for the comparator
to KI3IKey input interrupt input pins
CNTR0
CMP0_0 to CMP0_2,
CMP1_0 to CMP1_2
RXD0, RXD1ISerial data input pins
TXD0, TXD1OSerial data output pins
VREFIReference voltage input pin to comparator
to P3_5, P3_7, P4_5
IApply 2.7 V to 5.5 V to the VCC pin. Apply 0 V to
the VSS pin.
Connect a capacitor between AVCC and AVSS.
IInput “L” on this pin resets the MCU.
circuit I/O. Connect a ceramic resonator or a
crystal oscillator between the XIN and XOUT pins.
To use an external clock, input it to the XIN pin
and leave the XOUT pin open.
OTimer X output pin
OTimer C output pins
I/OCMOS I/O ports. Each port has an I/O select
direction register, allowing each pin in the port to
be directed for input or output individually.
Any port set to input can be set to use a pull-up
resistor or not by a program.
P1_0 to P1_3 also function as LED drive ports.
Rev.1.30Apr 14, 2006Page 10 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group1. Overview
Table 1.6Pin Name Information by Pin Number of PLSP0020JB-A, PRDP0020BA-A packages
Pin
Number
1P3_5CMP1_2
2P3_7
3
4XOUTP4_7
5VSS/AVSS
6XINP4_6
7VCC/AVCC
8MODE
9P4_5
10P1_7
11P1_6CLK0
12P1_5
13P1_4TXD0
14P1_3
15P1_2
16VREFP4_2
17P1_1
18P1_0
19P3_3
20P3_4CMP1_1
Control
Pin
RESET
Port
InterruptTimerSerial InterfaceComparator
INT0
INT10
INT11
KI3
KI2
KI1
KI0
INT3
I/O Pin Functions for Peripheral Modules
CNTR0
CNTR00
CNTR01RXD0
TZOUTAN11
CMP0_2AN10
CMP0_1AN9
CMP0_0AN8
TCIN/CMP1_0
TXD1
RXD1
Rev.1.30Apr 14, 2006Page 11 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group1. Overview
Table 1.7Pin Name Information by Pin Number of PWQN0028KA-B package
Rev.1.30Apr 14, 2006Page 12 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group2. Central Processing Unit (CPU)
2.Central Processing Unit (CPU)
Figure 2.1 shows the CPU Registers. The CPU contains 13 registers. R0, R1, R2, R3, A0, A1, and FB
configure a register bank. There are two sets of register bank.
b31
R2
R3
b15b8b7
R0H (high-order of R0)
R1H (high-order of R1) R1L (low-order of R1)
R0L (low-order of R0)
R2
R3
A0
A1
FB
b15b19
INTBH
The 4-high order bits of INTB are INTBH and
the 16-low bits of INTB are INTBL.
b19
INTBL
PC
b15
USP
ISP
SB
b0
Data registers
Address registers
Frame base register
b0
Interrupt table register
b0
Program counter
b0
User stack pointer
Interrupt stack pointer
Static base register
(1)
(1)
(1)
b15
IPL
NOTE:
1. These registers comprise a register bank. There are two register banks.
Figure 2.1CPU Registers
b15
b0
FLG
b8
b7
b0
C
DZSBOIU
Flag register
Carry flag
Debug flag
Zero flag
Sign flag
Register bank select flag
Overflow flag
Interrupt enable flag
Stack pointer select flag
Reserved bit
Processor interrupt priority level
Reserved bit
Rev.1.30Apr 14, 2006Page 13 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group2. Central Processing Unit (CPU)
2.1Data Registers (R0, R1, R2, and R3)
R0 is a 16-bit register for transfer, arithmetic, and logic operations. T he same applies to R1 to R3. R0
can be split into high-order bits (R0H) and low-order bits (R0L) to be used separately as 8-bit data
registers. R1H and R1L are analogous to R0H and R0L. R2 can be combined with R0 and used as a
32-bit data register (R2R0). R3R1 is analogous to R2R0.
2.2Address Registers (A0 and A1)
A0 is a 16-bit register for address register indirect addressing and address register relative addressing.
It is also used for transfer, arithmetic and logic operations. A1 is analogous to A0. A1 can be combined
with A0 and used as a 32-bit address register (A1A0).
2.3Frame Base Register (FB)
FB is a 16-bit register for FB relative addressing.
2.4Interrupt Table Register (INTB)
INTB is a 20-bit register that indicates the start address of an interrupt vector table.
2.5Program Counter (PC)
PC is 20 bits wide, indicates the address of the next instruction to be executed.
2.6User Stack Pointer (USP) and Interrupt Stack Pointer (ISP)
The stack pointer (SP), USP, and ISP, are each 16 bits wide. The U flag of FLG is used to switch
between USP and ISP.
2.7Static Base Register (SB)
SB is a 16-bit register for SB relative addressing.
2.8Flag Register (FLG)
FLG is an 11-bit register indicating the CPU state.
2.8.1Carry Flag (C)
The C flag retains a carry, borrow, or shift-out bits that have been generated by the arithmetic and logic
unit.
2.8.2Debug Flag (D)
The D flag is for debugging only. Set it to 0.
2.8.3Zero Flag (Z)
The Z flag is set to 1 when an arithmetic operation results in 0; otherwise to 0.
2.8.4Sign Flag (S)
The S flag is set to 1 when an arithmetic operation results in a negative value; otherwise to 0.
2.8.5Register Bank Select Flag (B)
Register bank 0 is selected when the B flag is 0. Register bank 1 is selected when this flag is set to 1.
2.8.6Overflow Flag (O)
The O flag is set to 1 when the operation results in an overflow; otherwise to 0.
Rev.1.30Apr 14, 2006Page 14 of 233
REJ09B0222-0130
R8C/18 Group, R8C/19 Group2. Central Processing Unit (CPU)
2.8.7Interrupt Enable Flag (I)
The I flag enables maskable interrupts.
Interrupts are 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.8Stack 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.9Processor Interrupt Priority Level (IPL)
IPL is 3 bits wide, assigns processor interrupt priority levels from level 0 to level 7.
If a requested interrupt has higher priority than IPL, the interrupt is enabled.
2.8.10Reserved Bit
If necessary, set to 0. When read, the content is undefined.
Rev.1.30Apr 14, 2006Page 15 of 233
REJ09B0222-0130
Loading...
+ 227 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.