m16c family product overview - part 1 - renesas e-learning · pdf fileuser may view slides...
TRANSCRIPT
1© 2008, Renesas Technology America, Inc., All Rights Reserved
Course Introduction
Purpose
� This training course provides an introduction to the M16C family of 16-bit
microcontrollers (MCUs) and describes key device features and benefits
Objectives
� Learn the M16C MCU architecture
� Discover the design features that make designing with M16C MCUs
simpler then other architectures
Content
� 39 pages (including this page)
� 7 questions
Learning Time
� 36 minutes
2© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benefits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
4© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
5© 2008, Renesas Technology America, Inc., All Rights Reserved
Powerful Architecture
3. Combined Instructions
• Loops
• If then else
• Function calls
• Jump tables
• Stack multiple
• Division
• 4-bit isolation
• Bit tables
• Bit pre-inversion
1. Variable Length Instructions
• Vary instruction DATA
• Vary instruction OPCODES
• Combine same source & destination
2. Memory operands
• SINGLE memory operands
• DUAL memory operands
• Shrinks program size
• Saves opcode cycles
• Requires fewer CPU registers
6© 2008, Renesas Technology America, Inc., All Rights Reserved
Powerful ArchitectureFlow Control
ADJNZ SBJNZ
JMP JMPI JMPS BCnd JCnd
JSR JSRI JSRS REIT RTS
ENTER EXITD INT INTO
Data Transfer
MOV MOVA MOVhl XCHG
LDC STC LDE STE
LDCTX STCTX LDINTB LDIPL
STNZ STZ STZX
PUSH PUSHM PUSHC PUSHA
POP POPM POPC
SMOVB SMOVF SSTR
Misc.
BRK NOP UND WAIT
Arithmetic
ADD ADDCF ADC SUB SSB
DADD DSUB DADC DSBB
CMP TST INC DEC
ABS NEG EXTS
MUL MULU RMPA
DIV DIVU DIVX
Logical
AND OR XOR NOT
ROLC RORC ROT SHA SHL
Bit Manipulation
BAND BOR BXOR BNOT
BNAND BNOR BNXOR BNTST
BTST BTSTC BTSTS
BSET BCLR FSET FCLR
•• Many instructions typically replace 2 or 3 traditional instructMany instructions typically replace 2 or 3 traditional instructions ions
7© 2008, Renesas Technology America, Inc., All Rights Reserved
Powerful Architecture
register->register, register->memory32bits/32bits=32bitsDIV
register->register, register->memory32bits*32bits=32bits
(Built-in Multiplier)MUL
register, memory32bits Logic shift
(Built-in barrel shifter)SHL
register, memory32bits Arithmetic shift
(Built-in barrel shifter)SHA
Immediate, register, memory32bits SavePUSH/POP
Immediate->register, immediate->memory, register->register,
register->memory, memory->register, memory->memory
32bits TransferMOV
Immediate->register, immediate->memory, register->register,
register->memory, memory->register, memory->memory
32bits CompareCMP
Immediate->register, immediate->memory, register->register,
register->memory, memory->register, memory->memory
32bits+32bits=32bits
(SUBtraction without borrow)SUB
Immediate->register, immediate->memory, register->register,
register->memory, memory->register, memory->memory
32bits+32bits=32bits
(ADDition without carry)ADD
Addressing ModeFunctionInstruction
8© 2008, Renesas Technology America, Inc., All Rights Reserved
Cycles
• 72% of M16C/60 instructions execute in 3 cycles or less
• 20 execute in a single cycle and/or require only 1 byte
0 10 20 30 40 50 60
1
2
3
4
5
6
7
8
9
10
> 11
Percent
M16C/60 MCUs
Other 16-bit MCUs
Quicker Instruction Execution
9© 2008, Renesas Technology America, Inc., All Rights Reserved
Powerful Architecture
Stack Base RegisterStatic Base Register
015
R2 (Data Register)
R3 (Data Register)
A0 (Address Register)
A1 (Address Register)
FB (Frame Base Register)
R1H (DR) R1L (DR)
R0H (DR) R0L (DR)
R2 (Data Register)
R3 (Data Register)
A0 (Address Register)
A1 (Address Register)
FB (Frame Base Register)
R1H (DR) R1L (DR)
R0H (DR) R0L (DR)
07815
23
23
LEGEND
Families:M16/Tiny, R8C, M16C/60, M16C/80
Examples in each family….(M16C/26, R8C/25, M16C/62P, M16C/80)
Families:M32C/80, R32C/100
Examples in this family….M32C/87, R32C/111
16 Bit Multiplier
16/32 Bit Barrel Shifter
019
User Stack Pointer
Interrupt Stack Pointer
Flag Register
015
Interrupt Table Register
23
Program Counter
015
Flag Save Register (SVF)
PC Save Register (SVP)
Vector Register (VCT)
23
015
23
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times
13© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
14© 2008, Renesas Technology America, Inc., All Rights Reserved
Quiet
Decoupled I/O and
CPU/peripheral supply rings
Huge on-chip capacitor
Optimized outputimpedance
Localstabilizationterminals of
analog circuitX
in
Vss
ADC
CPU FLASH
Peripherals
VU
/DC
Vcc
NM
I
Xout
RE
SE
T
Vss
Vcc
VccGNDRESET
Pin assignment optimizedfor bypass capacitor and oscillator layout
Symmetric terminals for I/O supply ring
AVss
AVcc
Single-supplyon-chip Voltage
Up/Down converter
15© 2008, Renesas Technology America, Inc., All Rights Reserved
Quiet
Competition’s
Example of a noise preventing circuit
Control signal lines protected
with noise filters and capacitors
Power supply ferrite beads placed on the VCC pin
MCU
Renesas
Example of an M16C-based circuit
Capacitors and resistors unnecessary
Up to 60% Better EMI Performance
Noise Free/Immune - Low EMI/EMS
16© 2008, Renesas Technology America, Inc., All Rights Reserved
Quiet
H8/300H 78K-IV SH2
M32C/83 (30MHz)M16C/62 (16MHz) M16C/80 (20MHz)
CISC MCU “A” CISC MCU “C” RISC MCU “A”
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times
18© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times
24© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
25© 2008, Renesas Technology America, Inc., All Rights Reserved
Flexible and Trusted Flash
• Flash sizes from 2KB to
1024KB
• Single-supply program/erase,
down to 2.7V
• Independent flash sequencer
• High-speed operation: 8 sec
erase/write for 256KB
• 10-year data retention
• Multiple methods for
safeguarding data
• Three programming
methods: Programmer,
CPU/User Mode, Boot Mode
• On-chip boot loader
26© 2008, Renesas Technology America, Inc., All Rights Reserved
� Software Lock bit — protects each block against erroneous
erase/write operations.
� Copy Guard — protects MCU’s internal memory against
external readout, so important programs or data can’t be copied.
� ROM-Code Protection — protects the internal flash memory
against readout or rewriting during a parallel rewrite operation.
(The ROM-Code Protect bit can only be rewritten in serial mode.)
� ID-Code Protection — protects flash
memory contents against illegal access
during serial rewrite operation by
rejecting commands unless the
ID code written in the chip matches the
ID code sent by the serial programmer.
(Setting the ID-Code Protection bit makes repetitive ID code
confirmation impossible.)
Safeguarding the Data in Flash
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times
28© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
30© 2008, Renesas Technology America, Inc., All Rights Reserved
PowerConsumption
Icc(typical)
ClockOperatingMode
Vcc
2.1µW (-99.99125%)0.7µAStop
5.4µW (-99.9775%)1.8µA32kHzWait
24mW8mA10MHz Normal
3V
4µW (-99.995%)0.8µANoneStop
10µW (-99.9875%)2.0µA32kHzWait
80mW16mA20MHzNormal
5V
None
Efficient Operating Modes Save Power
31© 2008, Renesas Technology America, Inc., All Rights Reserved
Efficient Code
Codesize Benchmark
49927 5160055697
59805 6013464806 64970
69808 70822 71708
98916 99320 101180105464
0
20000
40000
60000
80000
100000
120000
IAR
M16
C/8
0
Renes
as M
32C
/8X
IAR
EW
M32
C
Renes
as M
16C
/6X
IAR
V85
0E V
2.11
IAR
V85
0 V
2.11
IAR
V85
0E V
1.12
IAR
AR
M7
Thumb V
2.10
IAR
V85
0 V
1.12
TASK
ING
C16
6/S
T10
Renes
as M
32R
/EC
U
AR
M7
Thumb
AR
M7
IAR
AR
M V
2.10
Co
de
siz
e [
By
te]
IAR M16C/80
Renesas
M32C/8X
IAR EWM32C
Renesas
M16C/6X
IAR V850E
V2.11
IAR V850
V2.11
IAR V850E
V1.12
IAR ARM7 Thumb
V2.10
IAR V850
V1.12
TASKING
C166/ST10
Renesas
M32R/ECU
ARM7 Thumb
ARM7
IAR ARM
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times
33© 2008, Renesas Technology America, Inc., All Rights Reserved
Key Features and Benfits
Flexible and
Trusted Flash
Broad Platform
Powerful
Architecture
Quiet
Reliable
Efficient
Compatibility
36© 2008, Renesas Technology America, Inc., All Rights Reserved
Compatibility
M16C/61
M16C/62
M16C/80
M32C/8x
• More upward-compatible pin assignments
• Highest number of useable pins
37© 2008, Renesas Technology America, Inc., All Rights Reserved
Compatibility
Industry’s most upward-compatible pin assignments
Pin Compatibility - Single Socket, Multiple MCUs
STxD4
M16C/83
RXD4/SCL4
M16C/80
SIN4
M16C/62
1 2
100
99
Port 9 pin 7/ A/D Trigger
M16C/61
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Slide
Allow user to leave quiz: After user has completed quiz
User may view slides after quiz: After passing quiz
User may attempt quiz: Unlimited times