Professional Documents
Culture Documents
Dspic30F2010 Data Sheet: High-Performance, 16-Bit Digital Signal Controllers
Dspic30F2010 Data Sheet: High-Performance, 16-Bit Digital Signal Controllers
Data Sheet
High-Performance,
16-bit Digital Signal Controllers
DS70118J
Note the following details of the code protection feature on Microchip devices:
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
PIC32 logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
2011, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-60932-889-4
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Companys quality system processes and procedures
are for its PIC MCUs and dsPIC DSCs, KEELOQ code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchips quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
DS70118J-page 2
dsPIC30F2010
High-Performance, 16-bit Digital Signal Controller
Note:
Peripheral Features:
High current sink/source I/O pins: 25 mA/25 mA
Three 16-bit timers/counters; optionally pair up
16-bit timers into 32-bit timer modules
Four 16-bit capture input functions
Two 16-bit compare/PWM output functions
- Dual Compare mode available
3-wire SPI modules (supports 4 Frame modes)
I2CTM module supports Multi-Master/Slave mode
and 7-bit/10-bit addressing
Addressable UART modules with FIFO buffers
Analog Features:
10-bit Analog-to-Digital Converter (ADC) with:
- 1 Msps (for 10-bit A/D) conversion rate
- Six input channels
- Conversion available during Sleep and Idle
Programmable Brown-out Reset
DS70118J-page 3
dsPIC30F2010
Special Digital Signal Controller
Features:
CMOS Technology:
DS70118J-page 4
28
12K/4K
512
1024
A/D 10-bit
1 Msps
6 ch
6 ch
Yes
I C
Motor
Control
PWM
2 TM
Output
Program
SRAM EEPROM Timer Input
Comp/Std
Mem. Bytes/
Bytes
Bytes
16-bit Cap
PWM
Instructions
SPI
dsPIC30F2010
Pins
UART
Device
QEI
dsPIC30F2010
Pin Diagrams
28-Pin SDIP and SOIC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dsPIC30F2010
MCLR
EMUD3/AN0/VREF+/CN2/RB0
EMUC3/AN1/VREF-/CN3/RB1
AN2/SS1/CN4/RB2
AN3/INDX/CN5/RB3
AN4/QEA/IC7/CN6/RB4
AN5/QEB/IC8/CN7/RB5
VSS
OSC1/CLKI
OSC2/CLKO/RC15
EMUD1/SOSCI/T2CK/U1ATX/CN1//RC13
EMUC1/SOSCO/T1CK/U1ARX/CN0/RC14
VDD
EMUD2/OC2/IC2/INT2/RD1
28
27
26
25
24
23
22
21
20
19
18
17
16
15
AVDD
AVSS
PWM1L/RE0
PWM1H/RE1
PWM2L/RE2
PWM2H/RE3
PWM3L/RE4
PWM3H/RE5
VDD
VSS
PGC/EMUC/U1RX/SDI1/SDA/RF2
PGD/EMUD/U1TX/SDO1/SCL/RF3
FLTA/INT0/SCK1/OCFA/RE8
EMUC2/OC1/IC1/INT1/RD0
28
27
26
25
24
23
22
EMUC3/AN1/VREF- /CN3/RB1
EMUD3/AN0/VREF+/CN2/RB0
MCLR
AVDD
AVSS
PWM1L/RE0
PWM1H/RE1
28-Pin QFN-S(1)
dsPIC30F2010
8
9
10
11
12
13
14
1
2
3
4
5
6
7
21
20
19
18
17
16
15
PWM2L/RE2
PWM2H/RE3
PWM3L/RE4
PWM3H/RE5
VDD
VSS
PGC/EMUC/U1RX/SDI1/SDA/RF2
EMUD1/SOSCI/T2CK/U1ATX/CN1/RC13
EMUC1/SOSCO/T1CK/U1ARX/CN0/RC14
VDD
EMUD2/OC2/IC2/INT2/RD1
EMUC2/OC1/IC1/INT1/RD0
FLTA/INT0/SCK1/OCFA/RE8
PGD/EMUD/U1TX/SDO1/SCL/RF3
AN2/SS1/CN4/RB2
AN3/INDX/CN5 RB3
AN4/QEA/IC7/CN6/RB4
AN5/QEB/IC8/CN7/RB5
VSS
OSC1/CLKI
OSC2/CLKO/RC15
Note
1:
The metal plane at the bottom of the device is not connected to any pins and is recommended to be connected to VSS externally.
DS70118J-page 5
dsPIC30F2010
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 CPU Architecture Overview........................................................................................................................................................ 11
3.0 Memory Organization ................................................................................................................................................................. 19
4.0 Address Generator Units ............................................................................................................................................................ 31
5.0 Interrupts .................................................................................................................................................................................... 37
6.0 Flash Program Memory .............................................................................................................................................................. 43
7.0 Data EEPROM Memory ............................................................................................................................................................. 49
8.0 I/O Ports ..................................................................................................................................................................................... 53
9.0 Timer1 Module ........................................................................................................................................................................... 57
10.0 Timer2/3 Module ........................................................................................................................................................................ 61
11.0 Input Capture Module................................................................................................................................................................. 67
12.0 Output Compare Module ............................................................................................................................................................ 71
13.0 Quadrature Encoder Interface (QEI) Module ............................................................................................................................. 75
14.0 Motor Control PWM Module ....................................................................................................................................................... 81
15.0 SPI Module................................................................................................................................................................................. 91
16.0 I2C Module ............................................................................................................................................................................. 95
17.0 Universal Asynchronous Receiver Transmitter (UART) Module .............................................................................................. 103
18.0 10-bit High-Speed Analog-to-Digital Converter (ADC) Module ................................................................................................ 111
19.0 System Integration ................................................................................................................................................................... 121
20.0 Instruction Set Summary .......................................................................................................................................................... 135
21.0 Development Support............................................................................................................................................................... 143
22.0 Electrical Characteristics .......................................................................................................................................................... 147
23.0 Packaging Information.............................................................................................................................................................. 185
The Microchip Web Site ..................................................................................................................................................................... 199
Customer Change Notification Service .............................................................................................................................................. 199
Customer Support .............................................................................................................................................................................. 199
Reader Response .............................................................................................................................................................................. 200
Product Identification System............................................................................................................................................................. 201
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of
silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
Microchips Worldwide Web site; http://www.microchip.com
Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
DS70118J-page 6
dsPIC30F2010
1.0
Note:
DEVICE OVERVIEW
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046). For more information on the
device instruction set and programming,
refer to the 16-bit MCU and DSC Programmers
Reference
Manual
(DS70157).
DS70118J-page 7
dsPIC30F2010
FIGURE 1-1:
Interrupt
Controller
16
24
Address Latch
Data EEPROM
(1 Kbyte)
16
X RAGU
X WAGU
Y AGU
16
Data Latch
X Data
RAM
(256 bytes)
Address
Latch
16
16
24
Program Memory
(12 Kbytes)
16
Data Latch
Y Data
RAM
(256 bytes)
Address
Latch
Data Access
24 Control Block
16
16
EMUD3/AN0/VREF+/CN2/RB0
EMUC3/AN1/VREF-/CN3/RB1
AN2/SS1/CN4/RB2
AN3/INDX/CN5/RB3
AN4/QEA/IC7/CN6/RB4
AN5/QEB/IC8/CN7/RB5
PORTB
Effective Address
16
Data Latch
ROM Latch
16
24
IR
16 x 16
W Reg Array
Decode
Instruction
Decode and
Control
Power-up
Timer
DSP
Engine
Divide
Unit
EMUC2/OC1/IC1/INT1/RD0
EMUD2/OC2/IC2/INT2/RD1
Oscillator
Start-up Timer
Timing
Generation
ALU<16>
POR/BOR
Reset
Watchdog
Timer
MCLR
SPI1
PORTC
16 16
Control Signals
to Various Blocks
OSC1/CLKI
EMUD1/SOSCI/T2CK/U1ATX/CN1/RC13
EMUC1/SOSCO/T1CK/U1ARX/CN0/RC14
OSC2/CLKO/RC15
16
16
16
PORTD
16
10-bit ADC
Input
Capture
Module
Output
Compare
Module
I2C
Timers
QEI
Motor Control
PWM
UART1
PWM1L/RE0
PWM1H/RE1
PWM2L/RE2
PWM2H/RE3
PWM3L/RE4
PWM3H/RE5
FLTA/INT0/SCK1/OCFA/RE8
PORTE
PGC/EMUC/U1RX/SDI1/SDA/RF2
PGD/EMUD/U1TX/SDO1/SCL/RF3
PORTF
DS70118J-page 8
dsPIC30F2010
Table 1-1 provides a brief description of device I/O pinouts and the functions that may be multiplexed to a port
pin. Multiple functions may exist on one port pin. When
multiplexing occurs, the peripheral modules functional
requirements may force an override of the data
direction of the port pin.
TABLE 1-1:
Buffer
Type
AN0-AN5
Analog
Pin Name
Description
Analog input channels.
AVDD
Positive supply for analog module. This pin must be connected at all times.
AVSS
Ground reference for analog module. This pin must be connected at all times.
CLKI
CLKO
I
O
CN0-CN7
ST
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
ST
ST
ST
ST
ST
ST
ST
ST
ST
Capture inputs. The dsPIC30F2010 has four capture inputs. The inputs are
numbered for consistency with the inputs on larger device variants.
INDX
QEA
I
I
ST
ST
QEB
ST
INT0
INT1
INT2
I
I
I
ST
ST
ST
External interrupt 0
External interrupt 1
External interrupt 2
FLTA
PWM1L
PWM1H
PWM2L
PWM2H
PWM3L
PWM3H
I
O
O
O
O
O
O
ST
MCLR
I/P
ST
OCFA
OC1-OC2
I
O
ST
OSC1
OSC2
I/O
EMUD
EMUC
EMUD1
EMUC1
EMUD2
EMUC2
EMUD3
EMUC3
ST/CMOS External clock source input. Always associated with OSC1 pin function.
DS70118J-page 9
dsPIC30F2010
TABLE 1-1:
Buffer
Type
PGD
PGC
I/O
I
ST
ST
RB0-RB5
I/O
ST
Pin Name
Description
RC13-RC14
I/O
ST
RD0-RD1
I/O
ST
RE0-RE5,
RE8
I/O
ST
RF2, RF3
I/O
ST
SCK1
SDI1
SDO1
SS1
I/O
I
O
I
ST
ST
ST
SCL
SDA
I/O
I/O
ST
ST
SOSCO
SOSCI
O
I
T1CK
T2CK
I
I
ST
ST
U1RX
U1TX
U1ARX
U1ATX
I
O
I
O
ST
ST
UART1 Receive.
UART1 Transmit.
UART1 Alternate Receive.
UART1 Alternate Transmit.
VDD
VSS
VREF+
Analog
VREF-
Analog
DS70118J-page 10
dsPIC30F2010
2.0
Note:
2.1
CPU ARCHITECTURE
OVERVIEW
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046). For more information on the
device instruction set and programming,
refer to the 16-bit MCU and DSC Programmers
Reference
Manual
(DS70157).
Core Overview
DS70118J-page 11
dsPIC30F2010
2.2
Programmers Model
2.2.1
2.2.2
STATUS REGISTER
2.2.3
PROGRAM COUNTER
DS70118J-page 12
dsPIC30F2010
FIGURE 2-1:
PROGRAMMERS MODEL
D15
D0
W0/WREG
PUSH.S Shadow
W1
DO Shadow
W2
W3
Legend
W4
DSP Operand
Registers
W5
W6
W7
Working Registers
W8
W9
DSP Address
Registers
W10
W11
W12/DSP Offset
W13/DSP Write-Back
W14/Frame Pointer
W15/Stack Pointer
SPLIM
AD39
AD15
AD31
AD0
ACCA
DSP
Accumulators
ACCB
PC22
PC0
Program Counter
0
0
7
TABPAG
TBLPAG
7
PSVPAG
0
RCOUNT
15
0
DCOUNT
DO Loop Counter
22
0
DOSTART
DOEND
22
15
0
Core Configuration Register
CORCON
OA
OB
SA
SB OAB SAB DA
SRH
OV
STATUS Register
SRL
DS70118J-page 13
dsPIC30F2010
2.3
Divide Support
2.4
DSP Engine
TABLE 2-1:
DSP INSTRUCTION
SUMMARY
Algebraic
Operation
ACC WB?
CLR
A=0
Yes
ED
A = (x y)2
No
EDAC
A = A + (x y)2
No
MAC
A = A + (x y)
Yes
MAC
A = A + x2
No
No change in A
Yes
Instruction
MOVSAC
A=xy
No
A=xy
No
A=Axy
Yes
MPY
MPY.N
MSC
TABLE 2-2:
DIVIDE INSTRUCTIONS
Instruction
DIVF
Function
Signed fractional divide: Wm/Wn W0; Rem W1
DIV.sd
DIV.ud
DS70118J-page 14
dsPIC30F2010
FIGURE 2-2:
40
S
a
40 Round t 16
u
Logic r
a
t
e
40-bit Accumulator A
40-bit Accumulator B
Carry/Borrow Out
Saturate
Adder
Carry/Borrow In
Negate
40
40
40
Barrel
Shifter
16
X Data Bus
40
Y Data Bus
Sign-Extend
32
16
Zero Backfill
32
33
17-bit
Multiplier/Scaler
16
16
To/From W Array
DS70118J-page 15
dsPIC30F2010
2.4.1
MULTIPLIER
2.4.2.1
2.4.2
DS70118J-page 16
4.
5.
6.
OA:
ACCA overflowed into guard bits
OB:
ACCB overflowed into guard bits
SA:
ACCA saturated (bit 31 overflow and saturation)
or
ACCA overflowed into guard bits and saturated
(bit 39 overflow and saturation)
SB:
ACCB saturated (bit 31 overflow and saturation)
or
ACCB overflowed into guard bits and saturated
(bit 39 overflow and saturation)
OAB:
Logical OR of OA and OB
SAB:
Logical OR of SA and SB
dsPIC30F2010
The SA and SB bits are modified each time data passes
through the adder/subtracter, but can only be cleared by
the user. When set, they indicate that the accumulator
has overflowed its maximum range (bit 31 for 32-bit
saturation, or bit 39 for 40-bit saturation) and will be
saturated (if saturation is enabled). When saturation is
not enabled, SA and SB default to bit 39 overflow and
thus indicate that a catastrophic overflow has occurred.
If the COVTE bit in the INTCON1 register is set, SA and
SB bits will generate an arithmetic warning trap when
saturation is disabled.
The overflow and saturation status bits can optionally
be viewed in the Status Register (SR) as the logical OR
of OA and OB (in bit OAB), and the logical OR of SA
and SB (in bit SAB). This allows programmers to check
one bit in the STATUS register to determine if either
accumulator has overflowed, or one bit to determine if
either accumulator has saturated. This would be useful
for complex number arithmetic which typically uses
both the accumulators.
The device supports three Saturation and Overflow
modes.
1.
2.
3.
2.4.2.2
Accumulator Write-Back
2.
2.4.2.3
Round Logic
DS70118J-page 17
dsPIC30F2010
2.4.2.4
2.4.3
BARREL SHIFTER
DS70118J-page 18
dsPIC30F2010
Note:
3.1
MEMORY ORGANIZATION
FIGURE 3-1:
Vector 52
Vector 53
000000
000002
000004
Vector Tables
000014
00007E
000080
0000FE
000100
User Flash
Program Memory
(4K instructions)
Data EEPROM
(1 Kbyte)
001FFE
002000
7FFBFE
7FFC00
7FFFFE
800000
Reserved
Configuration Memory
Space
Reserved
(Read 0s)
User Memory
Space
3.0
8005BE
8005C0
8005FE
800600
Reserved
Device Configuration
Registers
F7FFFE
F80000
F8000E
F80010
Reserved
DEVID (2)
FEFFFE
FF0000
FFFFFE
DS70118J-page 19
dsPIC30F2010
TABLE 3-1:
Access Type
Instruction Access
TBLRD/TBLWT
TBLRD/TBLWT
Program Space Visibility
FIGURE 3-2:
<23>
User
User (TBLPAG<7> = 0)
Configuration (TBLPAG<7> = 1)
User
<0>
0
PC<22:1>
0
TBLPAG<7:0>
Data EA <15:0>
TBLPAG<7:0>
Data EA <15:0>
0
PSVPAG<7:0>
Data EA <14:0>
Program Counter
Select
Using
Program
Space
Visibility
EA
PSVPAG Reg
8 bits
15 bits
EA
Using
Table
Instruction
1/0
TBLPAG Reg
8 bits
User/
Configuration
Space
Select
16 bits
24-bit EA
Byte
Select
Note: Program Space Visibility cannot be used to access bits <23:16> of a word in program memory.
DS70118J-page 20
dsPIC30F2010
3.1.1
2.
3.
4.
Figure 3-2 shows how the EA is created for table operations and data space accesses (PSV = 1). Here,
P<23:0> refers to a program space word, whereas
D<15:0> refers to a data space word.
FIGURE 3-3:
Program Memory
Phantom Byte
(Read as 0)
23
16
00000000
00000000
00000000
00000000
TBLRDL.W
TBLRDL.B (Wn<0> = 0)
TBLRDL.B (Wn<0> = 1)
DS70118J-page 21
dsPIC30F2010
FIGURE 3-4:
23
16
00000000
00000000
00000000
00000000
TBLRDH.B (Wn<0> = 0)
Program Memory
Phantom Byte
(Read as 0)
3.1.2
TBLRDH.B (Wn<0> = 1)
DS70118J-page 22
Note that by incrementing the PC by 2 for each program memory word, the Least Significant 15 bits of
data space addresses directly map to the Least Significant 15 bits in the corresponding program space
addresses. The remaining bits are provided by the Program Space Visibility Page register, PSVPAG<7:0>, as
shown in Figure 3-5.
Note:
dsPIC30F2010
FIGURE 3-5:
Data Space
Program Space
0x100100
0x0000
PSVPAG(1)
0x00
8
15
EA<15> = 0
Data
Space
EA
16
15
EA<15> = 1
0x8000
Address
15 Concatenation 23
23
15
0
0x001200
0xFFFF
BSET
MOV
MOV
MOV
CORCON,#2
#0x00, W0
W0, PSVPAG
0x9200, W0
Data Read
Note: PSVPAG is an 8-bit register, containing bits <22:15> of the program space address
(i.e., it defines the page in program space to which the upper half of data space is being mapped).
3.2
The core has two data spaces. The data spaces can be
considered either separate (for some DSP instructions), or as one unified linear address range (for MCU
instructions). The data spaces are accessed using two
Address Generation Units (AGUs) and separate data
paths.
3.2.1
DS70118J-page 23
dsPIC30F2010
FIGURE 3-6:
SFR Space
(See Note)
0x0001
LSB
Address
16 bits
LSB
0x0000
SFR Space
0x07FE
0x0800
0x07FF
0x0801
2560 bytes
Near
Data
Space
0x08FF
0x0901
0x08FE
0x0900
Y Data RAM (Y)
256 bytes
0x09FF
0x0A00
(See Note)
0x8001
0x8000
X Data
Unimplemented (X)
Optionally
Mapped
into Program
Memory
0xFFFF
Note:
DS70118J-page 24
0xFFFE
dsPIC30F2010
DATA SPACE FOR MCU AND DSP (MAC CLASS) INSTRUCTIONS
SFR Space
SFR Space
X Space
FIGURE 3-7:
Unused
Y Space
Unused
X Space
X Space
(Y Space)
Unused
DS70118J-page 25
dsPIC30F2010
3.2.2
DATA SPACES
3.2.3
The X data space is used by all instructions and supports all addressing modes. There are separate read
and write data buses. The X read data bus is the return
data path for all instructions that view data space as
combined X and Y address space. It is also the X
address space data path for the dual operand read
instructions (MAC class). The X write data bus is the
only write path to data space for all instructions.
The X data space also supports Modulo Addressing for
all instructions, subject to addressing mode restrictions. Bit-Reversed addressing is only supported for
writes to X data space.
The Y data space is used in concert with the X data
space by the MAC class of instructions (CLR, ED, EDAC,
MAC, MOVSAC, MPY, MPY.N and MSC) to provide two
concurrent data read paths. No writes occur across the
Y bus. This class of instructions dedicates two W register pointers, W10 and W11, to always address Y data
space, independent of X data space, whereas W8 and
W9 always address X data space. Note that during
accumulator write-back, the data address space is considered a combination of X and Y data spaces, so the
write occurs across the X bus. Consequently, the write
can be to any address in the entire data space.
The Y data space can only be used for the data
prefetch operation associated with the MAC class of
instructions. It also supports Modulo Addressing for
automated circular buffers. Of course, all other instructions can access the Y data address space through the
X data path, as part of the composite linear space.
The boundary between the X and Y data spaces is
defined as shown in Figure 3-6 and is not user programmable. Should an EA point to data outside its own
assigned address space, or to a location outside physical memory, an all-zero word/byte will be returned. For
example, although Y address space is visible by all
non-MAC instructions using any Addressing mode, an
attempt by a MAC instruction to fetch data from that
space, using W8 or W9 (X space pointers), will return
0x0000.
TABLE 3-2:
EFFECT OF INVALID
MEMORY ACCESSES
Attempted Operation
3.2.4
DATA ALIGNMENT
FIGURE 3-8:
Data Returned
EA = an unimplemented address
0x0000
0x0000
0x0000
15
DATA ALIGNMENT
MSB
87
LSB
0001
Byte 1
Byte 0
0000
0003
Byte 3
Byte 2
0002
0005
Byte 5
Byte 4
0004
DS70118J-page 26
dsPIC30F2010
A sign-extend (SE) instruction is provided to allow
users to translate 8-bit signed data to 16-bit signed
values. Alternatively, for 16-bit unsigned data, users
can clear the MSB of any W register by executing a
zero-extend (ZE) instruction on the appropriate
address.
Although most instructions are capable of operating on
word or byte data sizes, it should be noted that some
instructions, including the DSP instructions, operate
only on words.
3.2.5
3.2.6
SOFTWARE STACK
There is a Stack Pointer Limit register (SPLIM) associated with the Stack Pointer. SPLIM is uninitialized at
Reset. As is the case for the Stack Pointer, SPLIM<0>
is forced to 0, because all stack operations must be
word-aligned. Whenever an EA is generated using
W15 as a source or destination pointer, the address
thus generated is compared with the value in SPLIM. If
the contents of the Stack Pointer (W15) and the SPLIM
register are equal and a push operation is performed, a
stack error trap will not occur. The stack error trap will
occur on a subsequent push operation. Thus, for example, if it is desirable to cause a stack error trap when the
stack grows beyond address 0x2000 in RAM, initialize
the SPLIM with the value, 0x1FFE.
Similarly, a stack pointer underflow (stack error) trap is
generated when the Stack Pointer address is found to
be less than 0x0800, thus preventing the stack from
interfering with the Special Function Register (SFR)
space.
A write to the SPLIM register should not be immediately
followed by an indirect read operation using W15.
FIGURE 3-9:
0x0000 15
All byte loads into any W register are loaded into the
LSB. The MSB is not modified.
PC<15:0>
000000000 PC<22:16>
<Free Word>
DS70118J-page 27
SFR Name
Address
(Home)
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
W0
0000
W0 / WREG
W1
0002
W1
W2
0004
W2
W3
0006
W3
W4
0008
W4
W5
000A
W5
W6
000C
W6
W7
000E
W7
W8
0010
W8
W9
0012
W9
W10
0014
W10
W11
0016
W11
W12
0018
W12
W13
001A
W13
W14
001C
W14
W15
001E
W15
SPLIM
0020
SPLIM
ACCAL
0022
ACCAL
ACCAH
0024
ACCAU
0026
ACCBL
0028
ACCBH
002A
ACCBU
002C
PCL
002E
ACCAH
ACCAU
ACCBL
ACCBH
ACCBU
PCL
PCH
0030
TBLPAG
0032
TBLPAG
PSVPAG
0034
PSVPAG
RCOUNT
0036
DCOUNT
0038
DOSTARTL
003A
DOSTARTH
003C
DOENDL
003E
DOENDH
0040
PCH
RCOUNT
DCOUNT
DOSTARTL
DOSTARTH
DOENDL
SAB
DA
DC
IPL2
SR
Legend:
0042
OA
OB
SA
SB
OAB
u = uninitialized bit; = unimplemented bit, read as 0
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
DOENDH
IPL1
IPL0
RA
OV
dsPIC30F2010
DS70118J-page 28
TABLE 3-3:
TABLE 3-3:
SFR Name
Address
(Home)
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
EDT
DL2
DL1
DL0
SATA
SATB
CORCON
0044
US
MODCON
0046
XMODEN
YMODEN
BWM<3:0>
Bit 5
Bit 4
SATDW ACCSAT
YWM<3:0>
Bit 3
Bit 2
Bit 1
Bit 0
IPL3
PSV
RND
IF
XWM<3:0>
Reset State
0000 0000 0010 0000
0000 0000 0000 0000
XMODSRT
0048
XS<15:1>
XMODEND
004A
XE<15:1>
YMODSRT
004C
YS<15:1>
YMODEND
004E
YE<15:1>
XBREV
0050
BREN
XB<14:0>
DISICNT
Legend:
0052
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
DISICNT<13:0>
dsPIC30F2010
DS70118J-page 29
dsPIC30F2010
NOTES:
DS70118J-page 30
dsPIC30F2010
4.0
Note:
4.1
4.1.1
Linear Addressing
Modulo (Circular) Addressing
Bit-Reversed Addressing
Linear and Modulo Data Addressing modes can be
applied to data space or program space. Bit-Reversed
Addressing is only applicable to data space addresses.
TABLE 4-1:
Addressing Mode
Description
Register Direct
Register Indirect
DS70118J-page 31
dsPIC30F2010
4.1.2
MCU INSTRUCTIONS
Register Direct
Register Indirect
Register Indirect Post-modified
Register Indirect Pre-modified
5-bit or 10-bit Literal
Note:
4.1.3
4.1.4
MAC INSTRUCTIONS
Register Indirect
Register Indirect Post-modified by 2
Register Indirect Post-modified by 4
Register Indirect Post-modified by 6
Register Indirect with Register Offset (Indexed)
4.1.5
OTHER INSTRUCTIONS
Register Direct
Register Indirect
Register Indirect Post-modified
Register Indirect Pre-modified
Register Indirect with Register Offset (Indexed)
Register Indirect with Literal Offset
8-bit Literal
16-bit Literal
Note:
DS70118J-page 32
dsPIC30F2010
4.2
Modulo Addressing
Modulo addressing is a method of providing an automated means to support circular data buffers using
hardware. The objective is to remove the need for software to perform data address boundary checks when
executing tightly looped code, as is typical in many
DSP algorithms.
Modulo addressing can operate in either data or
program space (since the data pointer mechanism is
essentially the same for both). One circular buffer can
be supported in each of the X (which also provides the
pointers into Program space) and Y data spaces.
Modulo addressing can operate on any W register
pointer. However, it is not advisable to use W14 or W15
for Modulo Addressing, since these two registers are
used as the Stack Frame Pointer and Stack Pointer,
respectively.
In general, any particular circular buffer can only be
configured to operate in one direction, as there are
certain restrictions on the buffer start address (for
incrementing buffers) or end address (for decrementing
buffers) based upon the direction of the buffer.
The only exception to the usage restrictions is for
buffers which have a power-of-2 length. As these
buffers satisfy the start and end address criteria, they
may operate in a Bidirectional mode, (i.e., address
boundary checks will be performed on both the lower
and upper address boundaries).
4.2.1
4.2.2
W ADDRESS REGISTER
SELECTION
The Modulo and Bit-Reversed Addressing Control register MODCON<15:0> contains enable flags as well as
a W register field to specify the W address registers.
The XWM and YWM fields select which registers will
operate with Modulo Addressing. If XWM = 15, X
RAGU and X WAGU Modulo Addressing are disabled.
Similarly, if YWM = 15, Y AGU Modulo Addressing is
disabled.
The X Address Space Pointer W register (XWM) to
which Modulo Addressing is to be applied, is stored in
MODCON<3:0> (see Table 3-3). Modulo addressing is
enabled for X data space when XWM is set to any value
other than 15 and the XMODEN bit is set at
MODCON<15>.
The Y Address Space Pointer W register (YWM) to
which Modulo Addressing is to be applied, is stored in
MODCON<7:4>. Modulo addressing is enabled for Y
data space when YWM is set to any value other than 15
and the YMODEN bit is set at MODCON<14>.
DS70118J-page 33
dsPIC30F2010
FIGURE 4-1:
Byte
Address
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
DO
MOV
AGAIN:
0x1100
#0x1100,W0
W0, XMODSRT
#0x1163,W0
W0,MODEND
#0x8001,W0
W0,MODCON
#0x0000,W0
#0x1110,W1
AGAIN,#0x31
W0, [W1++]
INC
W0,W0
0x1163
DS70118J-page 34
dsPIC30F2010
4.2.3
MODULO ADDRESSING
APPLICABILITY
4.3
Bit-Reversed Addressing
4.3.1
2.
3.
FIGURE 4-2:
BIT-REVERSED ADDRESSING
IMPLEMENTATION
b7 b6 b5 b4
b3 b2 b1
0
Bit Locations Swapped Left-to-Right
Around Center of Binary Value
b7 b6 b5 b1
b2 b3 b4
Bit-Reversed Address
Pivot Point
XB = 0x0008 for a 16-word Bit-Reversed Buffer
DS70118J-page 35
dsPIC30F2010
TABLE 4-2:
Bit-Reversed
Address
A3
A2
A1
A0
Decimal
A3
A2
A1
A0
Decimal
12
10
14
10
11
13
12
13
11
14
15
15
TABLE 4-3:
Note 1:
32768
0x4000
16384
0x2000
8192
0x1000
4096
0x0800
2048
0x0400
1024
0x0200
512
0x0100
256
0x0080
128
0x0040
64
0x0020
32
0x0010
16
0x0008
0x0004
0x0002
0x0001
Modifier values greater than 256 words exceed the data memory available on the dsPIC30F2010 device.
DS70118J-page 36
dsPIC30F2010
5.0
Note:
INTERRUPTS
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046). For more information on the
device instruction set and programming,
refer to the 16-bit MCU and DSC Programmers
Reference
Manual
(DS70157).
Note:
DS70118J-page 37
dsPIC30F2010
5.1
Interrupt Priority
DS70118J-page 38
TABLE 5-1:
dsPIC30F2010 INTERRUPT
VECTOR TABLE
INT
Vector
Number Number
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45-53
Interrupt Source
dsPIC30F2010
5.2
Reset Sequence
5.2.1
5.3
Traps
RESET SOURCES
5.3.1
TRAP SOURCES
The following traps are provided with increasing priority. However, since all traps can be nested, priority has
little effect.
2.
3.
4.
If the user does not intend to take corrective action in the event of a trap error condition, these vectors must be loaded with
the address of a default handler that simply contains the RESET instruction. If, on
the other hand, one of the vectors containing an invalid address is called, an
address error trap is generated.
DS70118J-page 39
dsPIC30F2010
Address Error Trap:
5.3.2
1.
2.
3.
4.
5.
6.
FIGURE 5-1:
TRAP VECTORS
1.
2.
Decreasing
Priority
IVT
AIVT
DS70118J-page 40
Interrupt 52 Vector
Interrupt 53 Vector
Reserved
Reserved
Reserved
Oscillator Fail Trap Vector
Stack Error Trap Vector
Address Error Trap Vector
Math Error Trap Vector
Reserved Vector
Reserved Vector
Reserved Vector
Interrupt 0 Vector
Interrupt 1 Vector
Interrupt 52 Vector
Interrupt 53 Vector
0x000000
0x000002
0x000004
0x000014
0x00007E
0x000080
0x000082
0x000084
0x000094
0x0000FE
dsPIC30F2010
5.4
Interrupt Sequence
5.5
FIGURE 5-2:
INTERRUPT STACK
FRAME
0x0000 15
PC<15:0>
SRL IPL3 PC<22:16>
<Free Word>
5.6
A context saving option is available using shadow registers. Shadow registers are provided for the DC, N,
OV, Z and C bits in SR, and the registers W0 through
W3. The shadows are only one level deep. The shadow
registers are accessible using the PUSH.S and POP.S
instructions only.
When the processor vectors to an interrupt, the
PUSH.S instruction can be used to store the current
value of the aforementioned registers into their
respective shadow registers.
If an ISR of a certain priority uses the PUSH.S and
POP.S instructions for fast context saving, then a
higher priority ISR should not include the same instructions. Users must save the key registers in software
during a lower priority interrupt, if the higher priority ISR
uses fast context saving.
5.7
5.8
DS70118J-page 41
SFR
Name
Addr.
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
INTCON1
0080 NSTDIS
OVATE
OVBTE
COVTE
MATHERR
ADDRERR
INTCON2
0082
ALTIVT
DISI
INT2EP
IFS0
0084
CNIF
MI2CIF
SI2CIF
NVMIF
ADIF
SPI1IF
T3IF
T2IF
OC2IF
IC2IF
T1IF
OC1IF
IC1IF
INT0IF
IFS1
0086
INT2IF
IC8IF
IC7IF
INT1IF
IFS2
0088
FLTAIF
QEIIF
PWMIF
IEC0
008C
CNIE
MI2CIE
SI2CIE
NVMIE
ADIE
SPI1IE
T3IE
T2IE
OC2IE
IC2IE
T1IE
OC1IE
IC1IE
INT0IE
IEC1
008E
INT2IE
IC8IE
IC7IE
INT1IE
IEC2
0090
FLTAIE
QEIIE
PWMIE
IPC0
0094
T1IP<2:0>
IPC1
0096
T31P<2:0>
IPC2
0098
ADIP<2:0>
IPC3
009A
CNIP<2:0>
IPC4
009C
IPC5
009E
IPC6
00A0
IPC7
00A2
IPC8
00A4
IPC9
00A6
IPC10
00A8
IPC11
Legend:
00AA
= unimplemented bit, read as 0
Note:
INT2IP<2:0>
U1TXIF U1RXIF
U1TXIE U1RXIE
OC1IP<2:0>
IC1IP<2:0>
T2IP<2:0>
U1TXIP<2:0>
OC2IP<2:0>
U1RXIP<2:0>
MI2CIP<2:0>
IC8IP<2:0>
STKERR OSCFAIL
INT1EP
INT0IP<2:0>
IC2IP<2:0>
SPI1IP<2:0>
SI2CIP<2:0>
NVMIP<2:0>
IC7IP<2:0>
INT1IP<2:0>
PWMIP<2:0>
FLTAIP<2:0>
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
QEIIP<2:0>
dsPIC30F2010
DS70118J-page 42
TABLE 5-2:
dsPIC30F2010
6.0
Note:
Master Clear (MCLR). This allows customers to manufacture boards with unprogrammed devices, and then
program the digital signal controller just before shipping
the product. This also allows the most recent firmware
or a custom firmware to be programmed.
6.2
6.1
6.3
FIGURE 6-1:
Run-Time Self-Programming
(RTSP)
Program Counter
NVMADR Reg EA
Using
NVMADR
Addressing
1/0
NVMADRU Reg
8 bits
16 bits
Working Reg EA
Using
Table
Instruction
User/Configuration
Space Select
1/0
TBLPAG Reg
8 bits
16 bits
24-bit EA
Byte
Select
DS70118J-page 43
dsPIC30F2010
6.4
RTSP Operation
6.5
NVMCON
NVMADR
NVMADRU
NVMKEY
6.5.1
NVMCON REGISTER
6.5.2
NVMADR REGISTER
6.5.3
NVMADRU REGISTER
6.5.4
NVMKEY REGISTER
DS70118J-page 44
Control Registers
dsPIC30F2010
6.6
Programming Operations
6.6.1
4.
5.
2.
3.
EXAMPLE 6-1:
6.
6.6.2
write
DS70118J-page 45
dsPIC30F2010
6.6.3
EXAMPLE 6-2:
; 31st_program_word
MOV
#LOW_WORD_31,W2
;
MOV
#HIGH_BYTE_31,W3
;
TBLWTL W2, [W0]
; Write PM low word into program latch
TBLWTH W3, [W0++]
; Write PM high byte into program latch
Note: In Example 6-2, the contents of the upper byte of W3 has no effect.
6.6.4
EXAMPLE 6-3:
DISI
#5
MOV
MOV
MOV
MOV
BSET
NOP
NOP
#0x55,W0
W0,NVMKEY
#0xAA,W1
W1,NVMKEY
NVMCON,#WR
DS70118J-page 46
TABLE 6-1:
File Name
Bit 15
Bit 14
Bit 13
Bit 9
Bit 8
Bit 7
NVMCON
0760
WR
WREN
WRERR
TWRI
Bit 6
Bit 5
Bit 4
Bit 3
NVMADR
0762
NVMADRU
0764
NVMADR<23:16>
KEY<7:0>
NVMADR<15:0>
NVMKEY
Legend:
0766
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Bit 2
PROGOP<6:0>
Bit 1
Bit 0
All RESETS
0000 0000 0000 0000
uuuu uuuu uuuu uuuu
dsPIC30F2010
DS70118J-page 47
dsPIC30F2010
NOTES:
DS70118J-page 48
dsPIC30F2010
7.0
Note:
NVMCON
NVMADR
NVMADRU
NVMKEY
7.1
Interrupt flag bit NVMIF in the IFS0 register is set when write is complete. It must
be cleared in software.
A TBLRD instruction reads a word at the current program word address. This example uses W0 as a
pointer to data EEPROM. The result is placed in
register W4, as shown in Example 7-1.
EXAMPLE 7-1:
MOV
MOV
MOV
TBLRDL
DS70118J-page 49
dsPIC30F2010
7.2
7.2.1
EXAMPLE 7-2:
7.2.2
EXAMPLE 7-3:
DS70118J-page 50
dsPIC30F2010
7.3
2.
3.
EXAMPLE 7-4:
7.3.1
#0x55,W0
W0,NVMKEY
#0xAA,W1
W1,NVMKEY
NVMCON,#WR
; Init pointer
; Get data
; Write data
complete in 2mS. CPU is not stalled for the Data Write Cycle
bit, use NVMIF or Timer IRQ to determine write complete
DS70118J-page 51
dsPIC30F2010
7.3.2
EXAMPLE 7-5:
MOV
MOV
MOV
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
TBLWTL
MOV
MOV
DISI
MOV
MOV
MOV
MOV
BSET
NOP
NOP
7.4
; Init pointer
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Write Verify
7.5
DS70118J-page 52
dsPIC30F2010
8.0
Note:
I/O PORTS
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046).
8.1
FIGURE 8-1:
Output Multiplexers
Output Enable
PIO Module
Data Bus
WR TRIS
CK
Output Data
Read TRIS
I/O Pad
TRIS Latch
D
WR LAT +
CK
WR Port
Data Latch
Read LAT
Input Data
Read Port
DS70118J-page 53
dsPIC30F2010
8.2
8.2.1
8.3
EXAMPLE 8-1:
MOV 0xFF00, W0 ;
;
MOV W0, TRISBB ;
NOP
;
btss PORTB, #13 ;
DS70118J-page 54
PORT WRITE/READ
EXAMPLE
Configure PORTB<15:8>
as inputs
and PORTB<7:0> as outputs
Delay 1 cycle
Next Instruction
TABLE 8-1:
SFR Name
Addr.
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
TRISB0
TRISB
02C6
TRISB5
TRISB4
TRISB3
TRISB2
TRISB1
PORTB
02C8
RB5
RB4
RB3
RB2
RB1
RB0
LATB
02CA
LATB5
LATB4
LATB3
LATB2
LATB1
LATB0
TRISC
02CC
TRISC15
TRISC14
TRISC13
PORTC
02CE
RC15
RC14
RC13
LATC
02D0
LATC15
LATC14
LATC13
TRISD
02D2
TRISD1
TRISD0
PORTD
02D4
RD1
RD0
LATD
02D6
LATD1
LATD0
TRISE
02D8
TRISE8
TRISE5
TRISE4
TRISE3
TRISE2
TRISE1
TRISE0
PORTE
02DA
RE8
RE5
RE4
RE3
RE2
RE1
RE0
LATE
02DC
LATE8
LATE5
LATE4
LATE3
LATE2
LATE1
LATE0
TRISF
02DE
TRISF3
TRISF2
PORTF
02E0
RF3
RF2
LATF
02E2
LATF3
LATF2
Legend:
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
TABLE 8-2:
SFR Name Addr.
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
00C0
CN15IE
CN14IE
CN13IE
CN12IE
CN11IE
CN10IE
CN9IE
CN8IE
CN7IE
CN6IE
CN5IE
CN4IE
CN3IE
CN2IE
CN1IE
CN0IE
CNEN2
00C2
CN21IE
CN20IE
CN19IE
CN18IE
CN17IE
CN16IE
CNPU1
00C4 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE CN9PUE CN8PUE CN7PUE CN6PUE CN5PUE
CN4PUE
CN3PUE
CN2PUE
CN1PUE
CNPU2
00C6
CNEN1
Legend:
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
CN21PUE CN20PUE CN19PUE CN18PUE CN17PUE CN16PUE 0000 0000 0000 0000
DS70118J-page 55
dsPIC30F2010
Bit 15
dsPIC30F2010
NOTES:
DS70118J-page 56
dsPIC30F2010
9.0
Note:
TIMER1 MODULE
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046).
DS70118J-page 57
dsPIC30F2010
FIGURE 9-1:
Comparator x 16
TSYNC
1
Reset
Sync
(3)
TMR1
0
0
1
CK
TGATE
TCS
TGATE
T1IF
Event Flag
TGATE
TON
SOSCO/
T1CK
1X
LPOSCEN
SOSCI
9.1
The 16-bit timer can be placed in the Gated Time Accumulation mode. This mode allows the internal TCY to
increment the respective timer when the gate input signal (T1CK pin) is asserted high. Control bit TGATE
(T1CON<6>) must be set to enable this mode. The
timer must be enabled (TON = 1) and the timer clock
source set to internal (TCS = 0).
When the CPU goes into the Idle mode, the timer will
stop incrementing, unless TSIDL = 0. If TSIDL = 1, the
timer will resume the incrementing sequence upon
termination of the CPU Idle mode.
9.2
TCKPS<1:0>
2
Timer Prescaler
Gate
Sync
01
TCY
00
9.3
Prescaler
1, 8, 64, 256
DS70118J-page 58
dsPIC30F2010
9.4
Timer Interrupt
9.5.1
Enabling an interrupt is accomplished via the respective timer interrupt enable bit, T1IE. The timer interrupt
enable bit is located in the IEC0 control register in the
Interrupt Controller.
When the CPU enters Sleep mode, the RTC will continue to operate, provided the 32 kHz external crystal
oscillator is active and the control bits have not been
changed. The TSIDL bit should be cleared to 0 in
order for RTC to continue operation in Idle mode.
9.5
9.5.2
Real-Time Clock
FIGURE 9-2:
RTC INTERRUPTS
When an interrupt event occurs, the respective interrupt flag, T1IF, is asserted and an interrupt will be generated, if enabled. The T1IF bit must be cleared in
software. The respective Timer interrupt flag, T1IF, is
located in the IFS0 status register in the Interrupt
Controller.
Enabling an interrupt is accomplished via the respective timer interrupt enable bit, T1IE. The Timer interrupt
enable bit is located in the IEC0 control register in the
Interrupt Controller.
RECOMMENDED
COMPONENTS FOR
TIMER1 LP OSCILLATOR
RTC
C1
SOSCI
32.768 kHz
XTAL
dsPIC30F2010
SOSCO
C2
C1 = C2 = 18 pF; R = 100K
DS70118J-page 59
SFR Name
Addr.
TMR1
0100
PR1
0102
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Timer 1 Register
Period Register 1
T1CON
Legend:
TSIDL
0104
TON
u = uninitialized bit; = unimplemented bit, read as 0
TGATE
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Reset State
uuuu uuuu uuuu uuuu
1111 1111 1111 1111
TCKPS1 TCKPS0
TSYNC
TCS
dsPIC30F2010
DS70118J-page 60
TABLE 9-1:
dsPIC30F2010
10.0
Note:
TIMER2/3 MODULE
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046).
Input Capture
Output Compare/Simple PWM
DS70118J-page 61
dsPIC30F2010
FIGURE 10-1:
Data Bus<15:0>
TMR3HLD
16
16
Write TMR2
Read TMR2
16
Reset
TMR3
TMR2
MSB
LSB
Sync
Comparator x 32
PR3
PR2
0
T3IF
Event Flag
CK
TGATE(T2CON<6>)
TCS
TGATE
TGATE
(T2CON<6>)
TON
T2CK
Note:
TCKPS<1:0>
2
1X
Gate
Sync
01
TCY
00
Prescaler
1, 8, 64, 256
Timer Configuration bit T32, T2CON(<3>) must be set to 1 for a 32-bit timer/counter operation. All control
bits are respective to the T2CON register.
DS70118J-page 62
dsPIC30F2010
FIGURE 10-2:
Reset
Comparator x 16
TMR2
Sync
T2IF
Event Flag
CK
TGATE
TCS
TGATE
1
TGATE
TON
T2CK
TCKPS<1:0>
2
1X
FIGURE 10-3:
Gate
Sync
01
TCY
00
Prescaler
1, 8, 64, 256
Equal
Reset
TMR3
0
1
CK
TGATE
Sync
See
NOTE
TON
TCKPS<1:0>
2
1 X
0 1
TCY
Note:
TGATE
TCS
TGATE
T3IF
Event Flag
Comparator x 16
Prescaler
1, 8, 64, 256
0 0
The dsPIC30F2010 does not have an external pin input to TIMER3. The following modes should not be used:
1. TCS = 1
2. TCS = 0 and TGATE = 1 (gated time accumulation)
DS70118J-page 63
dsPIC30F2010
10.1
The 32-bit timer can be placed in the Gated Time Accumulation mode. This mode allows the internal TCY to
increment the respective timer when the gate input signal (T2CK pin) is asserted high. Control bit TGATE
(T2CON<6>) must be set to enable this mode. When in
this mode, Timer2 is the originating clock source. The
TGATE setting is ignored for Timer3. The timer must be
enabled (TON = 1) and the timer clock source set to
internal (TCS = 0).
The falling edge of the external signal terminates the
count operation, but does not reset the timer. The user
must reset the timer in order to start counting from zero.
10.2
10.3
10.4
10.5
Timer Interrupt
Timer Prescaler
DS70118J-page 64
TABLE 10-1:
SFR Name Addr.
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
TMR2
0106
Timer2 Register
TMR3HLD
0108
TMR3
010A
Timer3 Register
PR2
010C
Period Register 2
PR3
010E
Period Register 3
T2CON
0110
T3CON
Legend:
0112
TON
TSIDL
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
TON
TSIDL
TGATE
TCKPS1 TCKPS0
T32
TCS
TGATE
TCKPS1 TCKPS0
TCS
dsPIC30F2010
DS70118J-page 65
dsPIC30F2010
NOTES:
DS70118J-page 66
dsPIC30F2010
11.0
Note:
Note:
Frequency/Period/Pulse Measurements
Additional sources of External Interrupts
FIGURE 11-1:
16
ICx
Pin
16
ICTMR
1
Prescaler
1, 4, 16
3
Edge
Detection
Logic
Clock
Synchronizer
FIFO
R/W
Logic
ICM<2:0>
Mode Select
ICxBUF
ICBNE, ICOV
ICI<1:0>
ICxCON
Data Bus
Note:
Interrupt
Logic
Set Flag
ICxIF
Where x is shown, reference is made to the registers or bits associated to the respective input capture channels 1 through N.
DS70118J-page 67
dsPIC30F2010
11.1
11.1.1
CAPTURE PRESCALER
There are four input capture prescaler settings, specified by bits ICM<2:0> (ICxCON<2:0>). Whenever the
capture channel is turned off, the prescaler counter will
be cleared. In addition, any Reset will clear the
prescaler counter.
11.1.2
11.1.3
11.1.4
DS70118J-page 68
dsPIC30F2010
11.2
11.2.1
CPU Sleep mode allows input capture module operation with reduced functionality. In the CPU Sleep
mode, the ICI<1:0> bits are not applicable, and the
input capture module can only function as an external
interrupt source.
The capture module must be configured for interrupt
only on the rising edge (ICM<2:0> = 111), in order for
the input capture module to be used while the device
is in Sleep mode. The prescale settings of 4:1 or 16:1
are not applicable in this mode.
11.2.2
11.3
DS70118J-page 69
0140
IC1CON
0142
IC2BUF
0144
IC2CON
0146
IC3BUF
0148
IC3CON
014A
IC4BUF
014C
IC4CON
014E
IC5BUF
0150
IC5CON
0152
IC6BUF
0154
IC6CON
0156
IC7BUF
0158
IC7CON
015A
IC8BUF
015C
IC8CON
015E
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
ICSIDL
ICSIDL
ICTMR
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICTMR
ICSIDL
ICSIDL
ICTMR
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICTMR
ICSIDL
ICSIDL
ICTMR
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICTMR
ICSIDL
ICTMR
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
ICSIDL
ICTMR
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Legend:
Reset State
uuuu uuuu uuuu uuuu
Bit 0
ICI<1:0>
ICOV
ICBNE
ICM<2:0>
dsPIC30F2010
DS70118J-page 70
TABLE 11-1:
dsPIC30F2010
12.0
Note:
FIGURE 12-1:
OCxRS
Output
Logic
OCxR
3
OCM<2:0>
Mode Select
Comparator
S Q
R
OCx
Output Enable
OCFA
(for x = 1 and 2)
Note:
OCTSEL
TMR3<15:0>
T2P2_MATCH
T3P3_MATCH
Where x is shown, reference is made to the registers associated with the respective Output Compare
channels 1and 2.
DS70118J-page 71
dsPIC30F2010
12.1
12.2
12.3
12.3.1
DS70118J-page 72
12.3.2
12.4
12.4.1
dsPIC30F2010
12.4.2
12.5
PWM PERIOD
The PWM period is specified by writing to the PRx register. The PWM period can be calculated using
Equation 12-1.
EQUATION 12-1:
PWM PERIOD
12.6
FIGURE 12-1:
Duty Cycle
TMR3 = PR3
T3IF = 1
(Interrupt Flag)
OCxR = OCxRS
12.7
TMR3 = PR3
T3IF = 1
(Interrupt Flag)
OCxR = OCxRS
TMR3 = Duty Cycle (OCxR)
TMR3 = Duty Cycle (OCxR)
The output compare channels have the ability to generate an interrupt on a compare match, for whichever
Match mode has been selected.
For all modes except the PWM mode, when a compare
event occurs, the respective interrupt flag (OCxIF) is
asserted and an interrupt will be generated, if enabled.
The OCxIF bit is located in the corresponding IFS
status register, and must be cleared in software. The
interrupt is enabled via the respective compare interrupt enable (OCxIE) bit, located in the corresponding
IEC Control register.
For the PWM mode, when an event occurs, the respective timer interrupt flag (T2IF or T3IF) is asserted and
an interrupt will be generated, if enabled. The IF bit is
located in the IFS0 status register, and must be cleared
in software. The interrupt is enabled via the respective
timer interrupt enable bit (T2IE or T3IE), located in the
IEC0 Control register. The output compare interrupt
flag is never set during the PWM mode of operation.
DS70118J-page 73
SFR Name
Addr.
Bit 15
OC1RS
0180
OC1R
0182
Bit 14
Bit 13
OCFRZ OCSIDL
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
OC1CON
0184
OC2RS
0186
OC2R
0188
OC2CON
Legend:
018A
OCFRZ OCSIDL
= unimplemented bit, read as 0
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
0000 0000 0000 0000
0000 0000 0000 0000
OCFLT1 OCTSEL1
OCM<2:0>
OCFLT2 OCTSEL2
OCM<2:0>
dsPIC30F2010
DS70118J-page 74
TABLE 12-1:
dsPIC30F2010
13.0
Note:
QUADRATURE ENCODER
INTERFACE (QEI) MODULE
The Quadrature Encoder Interface (QEI) is a key feature requirement for several motor control applications,
such as Switched Reluctance (SR) and AC Induction
Motor (ACIM). The operational features of the QEI are,
but not limited to:
This section describes the Quadrature Encoder Interface (QEI) module and associated operational modes.
The QEI module provides the interface to incremental
encoders for obtaining motor positioning data. Incremental encoders are very useful in motor control
applications.
FIGURE 13-1:
Sleep Input
TQCS
TCY
Synchronize
Det
0
Prescaler
1, 8, 64, 256
1
1
QEIM<2:0>
0
TQGATE
QEA
Programmable
Digital Filter
UPDN_SRC
0
QEICON<11>
2
Quadrature
Encoder
Interface Logic
QEB
Programmable
Digital Filter
INDX
Programmable
Digital Filter
CK
QEIIF
Event
Flag
Equal
3
QEIM<2:0>
Mode Select
DS70118J-page 75
dsPIC30F2010
13.1
13.2
13.2.1
DS70118J-page 76
13.2.2
13.2.3
Note:
dsPIC30F2010
13.3
There are two Measurement modes which are supported and are termed x2 and x4. These modes are
selected by the QEIM<2:0> mode select bits located in
SFR QEICON<10:8>.
When control bits QEIM<2:0> = 100 or 101, the x2
Measurement mode is selected and the QEI logic only
looks at the Phase A input for the position counter
increment rate. Every rising and falling edge of the
Phase A signal causes the position counter to be incremented or decremented. The Phase B signal is still
utilized for the determination of the counter direction,
just as in the x4 mode.
Within the x2 Measurement mode, there are two
variations of how the position counter is reset:
1.
2.
The x4 Measurement mode provides for finer resolution data (more position counts) for determining motor
position.
13.4
13.5
13.6
13.6.1
13.6.2
DS70118J-page 77
dsPIC30F2010
13.7
13.7.1
13.7.2
When the CPU is placed in the Idle mode and the QEI
module is configured in the 16-bit Timer mode, the
16-bit timer will operate if the QEISIDL bit (QEICON<13>) = 0. This bit defaults to a logic 0 upon
executing POR and BOR. For halting the timer module
during the CPU Idle mode, QEISIDL should be set
to 1.
13.8
DS70118J-page 78
TABLE 13-1:
SFR
Name
Addr.
Bit 15
Bit 14
QEICON
0122
CNTERR
DFLTCON
0124
POSCNT
0126
Position Counter<15:0>
MAXCNT
Legend:
0128
= unimplemented bit, read as 0
Maximun Count<15:0>
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Bit 13
Bit 12 Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
IMV1
IMV0
CEID
QEOUT
Bit 6
QECK2
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
TQGATE TQCKPS1 TQCKPS0 POSRES TQCS UPDN_SRC 0000 0000 0000 0000
QECK1
QECK0
dsPIC30F2010
DS70118J-page 79
dsPIC30F2010
NOTES:
DS70118J-page 80
dsPIC30F2010
14.0
Note:
DS70118J-page 81
dsPIC30F2010
FIGURE 14-1:
PWMCON1
PWM Enable and Mode SFRs
PWMCON2
DTCON1
FLTACON
OVDCON
PWM Manual
Control SFR
PWM Generator 3
PDC3 Buffer
PDC3
Comparator
PWM
Generator 2
PTMR
PWM3H
Channel 3 Dead-Time
Generator and
Override Logic
Channel 2 Dead-Time
Generator and
Override Logic
PWM3L
Output
Driver
Block
PWM2H
PWM2L
Comparator
PWM
Generator 1
PTPER
Channel 1 Dead-Time
Generator and
Override Logic
PWM1H
PWM1L
FLTA
PTPER Buffer
PTCON
Comparator
SEVTDIR
SEVTCMP
Special Event
Postscaler
PTDIR
DS70118J-page 82
dsPIC30F2010
14.1
14.1.1
14.1.2
SINGLE-SHOT MODE
14.1.3
CONTINUOUS UP/DOWN
COUNTING MODES
DS70118J-page 83
dsPIC30F2010
14.1.4
14.2
PWM Period
PTPER is a 15-bit register and is used to set the counting period for the PWM time base. PTPER is a doublebuffered register. The PTPER buffer contents are
loaded into the PTPER register at the following
instances:
The Double Update mode provides two additional functions to the user. First, the control loop bandwidth is
doubled because the PWM duty cycles can be
updated, twice per period. Second, asymmetrical center-aligned PWM waveforms can be generated, which
are useful for minimizing output waveform distortion in
certain motor control applications.
Note:
14.1.5
EQUATION 14-1:
can
be
determined
using
PWM PERIOD
EQUATION 14-2:
14.1.6
The match output of PTMR can optionally be postscaled through a 4-bit postscaler (which gives a 1:1 to
1:16 scaling).
EQUATION 14-3:
DS70118J-page 84
Resolution =
PWM RESOLUTION
log (2 TPWM/TCY)
log (2)
dsPIC30F2010
14.3
Edge-Aligned PWM
Edge-aligned PWM signals are produced by the module when the PWM time base is in the Free Running or
Single Shot mode. For edge-aligned PWM outputs, the
output has a period specified by the value in PTPER
and a duty cycle specified by the appropriate duty cycle
register (see Figure 14-2). The PWM output is driven
active at the beginning of the period (PTMR = 0) and is
driven inactive when the value in the duty cycle register
matches PTMR.
If the value in a particular duty cycle register is zero,
then the output on the corresponding PWM pin will be
inactive for the entire PWM period. In addition, the output on the PWM pin will be active for the entire PWM
period if the value in the duty cycle register is greater
than the value held in the PTPER register.
FIGURE 14-2:
EDGE-ALIGNED PWM
New Duty Cycle Latched
14.4
Center-Aligned PWM
FIGURE 14-3:
CENTER-ALIGNED PWM
Period/2
PTPER
PTPER
PTMR
Value
PTMR
Value
Duty
Cycle
0
Duty Cycle
Period
Period
14.5
DS70118J-page 85
dsPIC30F2010
14.5.1
14.6
14.7
Dead-Time Generators
14.7.1
DEAD-TIME GENERATORS
14.7.2
DEAD-TIME RANGES
DS70118J-page 86
dsPIC30F2010
FIGURE 14-4:
PWMxH
PWMxL
14.8
An independent PWM Output mode is required for driving certain types of loads. A particular PWM output pair
is in the Independent Output mode when the corresponding PMOD bit in the PWMCON1 register is set.
No dead-time control is implemented between adjacent
PWM I/O pins when the module is operating in the
Independent mode and both I/O pins are allowed to be
active simultaneously.
In the Independent mode, each duty cycle generator is
connected to both of the PWM I/O pins in an output
pair. By using the associated duty cycle register and
the appropriate bits in the OVDCON register, the user
may select the following signal output options for each
PWM I/O pin operating in the Independent mode:
I/O pin outputs PWM signal
I/O pin inactive
I/O pin active
14.9
14.10.1
14.10.2
OVERRIDE SYNCHRONIZATION
DS70118J-page 87
dsPIC30F2010
14.11 PWM Output and Polarity Control
14.12.2
14.12.3
FAULT STATES
14.11.1
14.12.1
The FLTA pin logic can operate independent of the PWM logic. If all the enable bits
in the FLTACON register are cleared, then
the FLTA pin could be used as a general
purpose interrupt pin. The FLTA pin has
an interrupt vector, interrupt flag bit and
interrupt priority bits associated with it.
DS70118J-page 88
dsPIC30F2010
14.14 PWM Special Event Trigger
The PWM module has a special event trigger that
allows A/D conversions to be synchronized to the PWM
time base. The A/D sampling and conversion time may
be programmed to occur at any point within the PWM
period. The special event trigger allows the user to minimize the delay between the time when A/D conversion
results are acquired, and the time when the duty cycle
value is updated.
The PWM special event trigger has an SFR named
SEVTCMP, and five control bits to control its operation.
The PTMR value for which a special event trigger
should occur is loaded into the SEVTCMP register.
When the PWM time base is in an Up/Down Counting
mode, an additional control bit is required to specify the
counting phase for the special event trigger. The count
phase is selected using the SEVTDIR control bit in the
SEVTCMP SFR. If the SEVTDIR bit is cleared, the special event trigger will occur on the upward counting
cycle of the PWM time base. If the SEVTDIR bit is set,
the special event trigger will occur on the downward
count cycle of the PWM time base. The SEVTDIR
control bit has no effect unless the PWM time base is
configured for an Up/Down Counting mode.
14.14.1
DS70118J-page 89
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
PTSIDL
Bit 7
Bit 6
Bit 5
Bit 4
PTOPS<3:0>
Bit 3
Bit 2
PTCKPS<1:0>
Bit 1
Bit 0
PTMOD<1:0>
Reset State
PTCON
01C0
PTEN
PTMR
01C2
PTDIR
PTPER
01C4
SEVTCMP
01C6 SEVTDIR
PWMCON1 01C8
PWMCON2 01CA
DTB<5:0>
PEN3H
PEN2H
PEN1H
PEN3L
PEN2L
PEN1L
IUE
OSYNC
UDIS
FAEN2
FAEN1
DTCON1
01CC
FLTACON
01D0
OVDCON
01D4
PDC1
01D6
PDC2
01D8
PDC3
Legend:
01DA
= unimplemented bit, read as 0
Note:
DTBPS<1:0>
DTAPS<1:0>
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
FAEN3
POUT3H POUT3L POUT2H POUT2L POUT1H POUT1L 0011 1111 0000 0000
dsPIC30F2010
DS70118J-page 90
TABLE 14-1:
dsPIC30F2010
15.0
Note:
SPI MODULE
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046).
The Serial Peripheral Interface (SPI) module is a synchronous serial interface. It is useful for communicating
with other peripheral devices such as EEPROMs, shift
registers, display drivers and A/D converters or other
microcontrollers. It is compatible with Motorola's SPI
and SIOP interfaces.
15.1
15.1.1
15.1.2
SDOx DISABLE
A control bit, DISSDO, is provided to the SPIxCON register to allow the SDOx output to be disabled. This will
allow the SPI module to be connected in an input only
configuration. SDO can also be used for general
purpose I/O.
DS70118J-page 91
dsPIC30F2010
15.2
FIGURE 15-1:
Write
SPIxBUF
SPIxBUF
Transmit
Receive
SPIxSR
SDIx
bit 0
SDOx
Shift
clock
SS and FSYNC
Control
Clock
Control
Edge
Select
SSx
Secondary
Prescaler
1:1-1:8
SCKx
FCY
Note: x = 1 or 2.
FIGURE 15-2:
Primary
Prescaler
1:1, 1:4,
1:16, 1:64
SPI Master
SPI Slave
SDOx
SDIy
SDIx
Shift Register
(SPIxSR)
MSb
LSb
Shift Register
(SPIySR)
MSb
SCKx
PROCESSOR 1
SDOy
Serial Clock
LSb
SCKy
PROCESSOR 2
Note: x = 1 or 2, y = 1 or 2.
DS70118J-page 92
dsPIC30F2010
15.3
15.4
15.5
DS70118J-page 93
SFR
Name
Addr.
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
SPI1STAT
0220
SPIEN
SPISIDL
SPI1CON
0222
FRMEN
SPIFSD
SPI1BUF
Legend:
0224
= unimplemented bit, read as 0
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
DISSDO MODE16
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
SPIROV
SPITBF
SMP
CKE
SSEN
CKP
MSTEN
SPRE2
SPRE1
SPRE0
PPRE1
PPRE0
dsPIC30F2010
DS70118J-page 94
TABLE 15-1:
dsPIC30F2010
16.0
Note:
I2C MODULE
16.1.1
16.1
FIGURE 16-1:
16.1.2
I2C has a 2-pin interface: pin SCL is clock and pin SDA
is data.
16.1.3
I2C REGISTERS
PROGRAMMERS MODEL
I2CRCV (8 bits)
bit 7
bit 0
bit 7
bit 0
I2CTRN (8 bits)
I2CBRG (9 bits)
bit 8
bit 0
I2CCON (16 bits)
bit 15
bit 0
bit 15
bit 0
bit 0
DS70118J-page 95
dsPIC30F2010
FIGURE 16-2:
I2CRCV
Read
SCL
Shift
Clock
I2CRSR
LSB
SDA
Addr_Match
Match Detect
Write
I2CADD
Read
Start and
Stop bit Detect
I2CSTAT
Write
Control Logic
Start, Restart,
Stop bit Generate
Write
I2CCON
Collision
Detect
Acknowledge
Generation
Clock
Stretching
Read
Read
Write
I2CTRN
LSB
Shift
Clock
Read
Reload
Control
BRG Down
Counter
DS70118J-page 96
Write
I2CBRG
FCY
Read
dsPIC30F2010
16.2
TABLE 16-1:
Address
Range
16.3.2
SLAVE RECEPTION
0x00
16.4
0x01-0x03
Reserved
In 10-bit mode, the basic receive and transmit operations are the same as in the 7-bit mode. However, the
criteria for address match is more complex.
0x04-0x07
0x08-0x77
0x78-0x7B
0x7C-0x7F
Reserved
16.3
16.3.1
SLAVE TRANSMISSION
16.4.1
Once a slave is addressed in this fashion, with the full 10bit address (we will refer to this state as
PRIOR_ADDR_MATCH), the master can begin sending
data bytes for a slave reception operation.
DS70118J-page 97
dsPIC30F2010
16.4.2
16.5
16.5.1
16.5.3
16.5.2
holding the SCL line low, the user has time to service
the ISR and read the contents of the I2CRCV before the
master device can initiate another receive sequence.
This will prevent buffer overruns from occurring.
DS70118J-page 98
16.5.4
16.6
16.7
Interrupts
I2C
The
module generates two interrupt flags, MI2CIF
(I2C Master Interrupt Flag) and SI2CIF (I2C Slave Interrupt Flag). The MI2CIF interrupt flag is activated on
completion of a master message event. The SI2CIF
interrupt flag is activated on detection of a message
directed to the slave.
dsPIC30F2010
16.8
Slope Control
16.9
IPMI Support
16.12.1
Transmission of a data byte, a 7-bit address or the second half of a 10-bit address is accomplished by simply
writing a value to I2CTRN register. The user should
only write to I2CTRN when the module is in a Wait
state. This action will set the buffer full flag (TBF) and
allow the Baud Rate Generator to begin counting and
start the next transmission. Each bit of address/data
will be shifted out onto the SDA pin after the falling
edge of SCL is asserted. The Transmit Status Flag,
TRSTAT (I2CSTAT<14>), indicates that a master
transmit is in progress.
16.12.2
16.12.3
EQUATION 16-1:
I2CBRG VALUE
F CY
F CY
I2CBRG = ------------- ------------------------------ 1
F SCL 1, 111, 111
DS70118J-page 99
dsPIC30F2010
16.12.4
CLOCK ARBITRATION
16.12.5
MULTI-MASTER COMMUNICATION,
BUS COLLISION AND BUS
ARBITRATION
16.13.2
For the I2C, the I2CSIDL bit selects if the module will
stop on Idle or continue on Idle. If I2CSIDL = 0, the
module will continue operation on assertion of the Idle
mode. If I2CSIDL = 1, the module will stop on Idle.
DS70118J-page 100
TABLE 16-2:
SFR Name Addr.
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Receive Register
Reset State
Transmit Register
I2CRCV
0200
I2CTRN
0202
0204
A10M
DISSLW
SMEN
GCEN
STREN
ACKDT
ACKEN
RCEN
PEN
RSEN
SEN
BCL
GCSTAT
ADD10
IWCOL
I2COV
D_A
R_W
RBF
TBF
I2CBRG
I2CCON
0206
I2CEN
I2CSTAT
0208
I2CADD
Legend:
ACKSTAT
TRSTAT
020A
= unimplemented bit, read as 0
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Address Register
dsPIC30F2010
DS70118J-page 101
dsPIC30F2010
NOTES:
DS70118J-page 102
dsPIC30F2010
17.0
UNIVERSAL ASYNCHRONOUS
RECEIVER TRANSMITTER
(UART) MODULE
Note:
17.1
FIGURE 17-1:
UTX8
Write
Transmit Control
Control TSR
Control Buffer
Generate Flags
Generate Interrupt
Load TSR
UxTXIF
UTXBRK
Data
UxTX
Parity
Parity
Generator
16 Divider
Control
Signals
Note: x = 1 only.
DS70118J-page 103
dsPIC30F2010
FIGURE 17-2:
16
Write
Read
Read Read
UxMODE
URX8
Write
UxSTA
8-9
LPBACK
UxRX
0
Start bit Detect
Parity Check
Stop bit Detect
Shift Clock Generation
Wake Logic
Control
Signals
FERR
Load RSR
to Buffer
Receive Shift Register
(UxRSR)
PERR
From UxTX
16 Divider
Note: x = 1 only.
DS70118J-page 104
dsPIC30F2010
17.2
17.2.1
17.2.2
17.3
17.3.1
1.
2.
3.
17.2.3
ALTERNATE I/O
17.2.4
Transmitting Data
4.
5.
17.3.2
17.3.3
DS70118J-page 105
dsPIC30F2010
17.3.4
TRANSMIT INTERRUPT
b)
17.3.5
TRANSMIT BREAK
17.4.2
17.4.3
RECEIVE INTERRUPT
a)
b)
17.4
Switching between the Interrupt modes during operation is possible, though generally not advisable during
normal operation.
17.4.1
Receiving Data
RECEIVING IN 8-BIT OR 9-BIT DATA
MODE
4.
5.
DS70118J-page 106
c)
17.5
17.5.1
dsPIC30F2010
17.5.2
17.5.3
17.5.4
IDLE STATUS
17.5.5
RECEIVE BREAK
17.6
17.7
Loopback Mode
17.8
EQUATION 17-1:
BAUD RATE
17.9
Setting the ADDEN bit (UxSTA<5>) enables this special mode, in which a 9th bit (URX8) value of 1 identifies the received word as an address rather than data.
This mode is only applicable for 9-bit data communication. The URXISEL control bit does not have any
impact on interrupt generation in this mode, since an
interrupt (if enabled) will be generated every time the
received word has the 9th bit set.
DS70118J-page 107
dsPIC30F2010
17.10 UART Operation During CPU
Sleep and Idle Modes
17.10.1
17.10.2
For the UART, the USIDL bit selects if the module will
stop operation when the device enters Idle mode, or
whether the module will continue on Idle. If USIDL = 0,
the module will continue operation during Idle mode. If
USIDL = 1, the module will stop on Idle.
DS70118J-page 108
TABLE 17-1:
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
ALTIO
Bit 9
Bit 8
Bit 7
U1MODE
020C
UARTEN
USIDL
U1STA
020E
UTXISEL
U1TXREG
0210
U1RXREG
0212
U1BRG
Legend:
0214
u = uninitialized bit; = unimplemented bit, read as 0
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
LPBACK
Bit 5
Bit 4
ABAUD
Bit 3
PERR
Bit 0
Reset State
TRMT
UTX8
Transmit Register
URX8
Receive Register
Bit 1
RIDLE
Bit 2
UTXBF
UTXBRK UTXEN
WAKE
Bit 6
OERR
dsPIC30F2010
DS70118J-page 109
dsPIC30F2010
NOTES:
DS70118J-page 110
dsPIC30F2010
18.0
Note:
The ADCON1, ADCON2 and ADCON3 registers control the operation of the ADC module. The ADCHS register selects the input channels to be converted. The
ADPCFG register configures the port pins as analog
inputs or as digital I/O. The ADCSSL register selects
inputs for scanning.
FIGURE 18-1:
Note:
AVDD
VREF+
AVSS
VREF-
+
-
AN1
AN1
AN4
AN2
AN5
CH1
ADC
10-bit Result
S/H
CH2
16-word, 10-bit
Dual Port
Buffer
+
-
S/H
CH3
CH1,CH2,
CH3,CH0
Sample
AN3
AN0
AN1
AN2
AN3
AN4
AN4
AN5
AN5
AN1
Conversion Logic
+
-
AN2
S/H
Input
Switches
S/H
Sample/Sequence
Control
Bus Interface
AN0
AN3
Data
Format
AN0
Input MUX
Control
CH0
DS70118J-page 111
dsPIC30F2010
18.1
The module contains a 16-word dual port read-only buffer, called ADCBUF0 through ADCBUFF, to buffer the
ADC results. The RAM is 10 bits wide, but is read into different format 16-bit words. The contents of the sixteen
ADC conversion result buffer registers, ADCBUF0
through ADCBUFF, cannot be written by user software.
18.2
Conversion Operation
2.
3.
4.
5.
6.
7.
18.3
DS70118J-page 112
The CHPS bits selects how many channels are sampled. This can vary from 1, 2 or 4 channels. If CHPS
selects 1 channel, the CH0 channel will be sampled at
the sample clock and converted. The result is stored in
the buffer. If CHPS selects 2 channels, the CH0 and
CH1 channels will be sampled and converted. If CHPS
selects 4 channels, the CH0, CH1, CH2 and CH3
channels will be sampled and converted.
The SMPI bits select the number of acquisition/conversion sequences that would be performed before an
interrupt occurs. This can vary from 1 sample per
interrupt to 16 samples per interrupt.
The user cannot program a combination of CHPS and
SMPI bits that specifies more than 16 conversions per
interrupt, or 8 conversions per interrupt, depending on
the BUFM bit. The BUFM bit, when set, will split the
16-word results buffer (ADCBUF0...ADCBUFF) into
two 8-word groups. Writing to the 8-word buffers will be
alternated on each interrupt event. Use of the BUFM bit
will depend on how much time is available for moving
data out of the buffers after the interrupt, as determined
by the application.
If the processor can quickly unload a full buffer within
the time it takes to acquire and convert one channel,
the BUFM bit can be 0 and up to 16 conversions may
be done per interrupt. The processor will have one
sample and conversion time to move the sixteen
conversions.
If the processor cannot unload the buffer within the
acquisition and conversion time, the BUFM bit should
be 1. For example, if SMPI<3:0> (ADCON2<5:2>) =
0111, then eight conversions will be loaded into 1/2
of the buffer, following which an interrupt occurs. The
next eight conversions will be loaded into the other
1/2 of the buffer. The processor will have the entire
time between interrupts to move the eight
conversions.
The ALTS bit can be used to alternate the inputs
selected during the sampling sequence. The input multiplexer has two sets of sample inputs: MUX A and
MUX B. If the ALTS bit is 0, only the MUX A inputs are
selected for sampling. If the ALTS bit is 1 and
SMPI<3:0> = 0000, on the first sample/convert
sequence, the MUX A inputs are selected, and on the
next acquire/convert sequence, the MUX B inputs are
selected.
The CSCNA bit (ADCON2<10>) will allow the CH0
channel inputs to be alternately scanned across a
selected number of analog inputs for the MUX A group.
The inputs are selected by the ADCSSL register. If a
particular bit in the ADCSSL register is 1, the corresponding input is selected. The inputs are always
scanned from lower to higher numbered inputs, starting
after each interrupt. If the number of inputs selected is
greater than the number of samples taken per interrupt,
the higher numbered inputs are unused.
dsPIC30F2010
18.4
18.5
Aborting a Conversion
18.6
EQUATION 18-1:
EXAMPLE 18-1:
ADCS<5:0> = 2
Therefore,
Set ADCS<5:0> = 5
TCY
(ADCS<5:0> + 1)
2
33 ns
=
(5 + 1)
2
Actual TAD =
= 99 ns
DS70118J-page 113
dsPIC30F2010
18.7
The dsPIC30F 10-bit ADC specifications permit a maximum 1 Msps sampling rate. Table 18-1 summarizes
the conversion speeds for the dsPIC30F 10-bit ADC
and the required operating conditions.
The configuration guidelines give the required setup
values for the conversion speeds above 500 ksps,
since they require external VREF pins usage and there
are some differences in the configuration procedure.
Configuration details that are not critical to the
conversion speed have been omitted.
Figure 18-2 depicts the recommended circuit for the
conversion rates above 500 ksps.
FIGURE 18-2:
ADC VOLTAGE
REFERENCE SCHEMATIC
VDD
R2
10
C2
0.1 F
VDD
C1
0.01 F
10
R1
AVSS
AVDD
VREF+
VREF-
VDD
C8
1 F
dsPIC30F2010
VDD
VDD
VSS
VDD
VSS
VDD
C5
1 F
VDD
DS70118J-page 114
dsPIC30F2010
TABLE 18-1:
A/D Speed
Up to
1 Msps(1)
TAD
Sampling
Minimum Time Min
83.33 ns
12 TAD
RS Max
VDD
Temperature
500
4.5V
to
5.5V
-40C to +85C
S/H
ADC
CH0
S/H
Up to
750 ksps(1)
95.24 ns
2 TAD
500
4.5V
to
5.5V
-40C to +85C
VREF- VREF+
ANx
Up to
600 ksps(1)
138.89 ns
12 TAD
500
3.0V
to
5.5V
CHX
S/H
-40C to +125C
ADC
VREF- VREF+
S/H
CH0
S/H
Up to
500 ksps
153.85 ns
1 TAD
5.0 k
4.5V
to
5.5V
ADC
-40C to +125C
VREF- VREF+
or
or
AVSS AVDD
ANx
CHX
S/H
ADC
ANx or VREF-
Up to
300 ksps
256.41 ns
1 TAD
5.0 k
3.0V
to
5.5V
-40C to +125C
VREF- VREF+
or
or
AVSS AVDD
ANx
CHX
S/H
ADC
ANx or VREF-
Note 1: External VREF- and VREF+ pins must be used for correct operation. See Figure 18-2 for recommended
circuit.
DS70118J-page 115
dsPIC30F2010
18.7.1
1 Msps CONFIGURATION
GUIDELINE
18.7.1.1
18.7.1.2
18.7.1.3
18.7.2
= 95.24 ns
18.7.3
1
12 x 1,000,000
= 83.33 ns
DS70118J-page 116
18.7.3.1
18.7.3.2
dsPIC30F2010
18.7.3.3
= 138.89 ns
FIGURE 18-3:
VA
Rs
18.8
ANx
RIC 250
VT = 0.6V
Sampling
Switch
RSS 3 k
RSS
CPIN
VT = 0.6V
I leakage
500 nA
CHOLD
= DAC capacitance
= 4.4 pF
VSS
Legend: CPIN
= input capacitance
VT
= threshold voltage
I leakage = leakage current at the pin due to
various junctions
RIC
= interconnect resistance
RSS
= sampling switch resistance
= sample/hold capacitance (from DAC)
CHOLD
Note: CPIN value depends on device package and is not tested. Effect of CPIN negligible if Rs 5 k.
DS70118J-page 117
dsPIC30F2010
18.9
18.10.2
FIGURE 18-4:
RAM Contents:
d09 d08 d07 d06 d05 d04 d03 d02 d01 d00
Read to Bus:
Signed Fractional (1.15)
d09 d08 d07 d06 d05 d04 d03 d02 d01 d00
Fractional (1.15)
d09 d08 d07 d06 d05 d04 d03 d02 d01 d00
Signed Integer
Integer
DS70118J-page 118
d09 d09 d09 d09 d09 d09 d09 d08 d07 d06 d05 d04 d03 d02 d01 d00
d09 d08 d07 d06 d05 d04 d03 d02 d01 d00
dsPIC30F2010
18.13 Configuring Analog Port Pins
An external RC filter is sometimes added for antialiasing of the input signal. The R component should be
selected to ensure that the sampling time requirements
are satisfied. Any external components connected (via
high-impedance) to an analog input pin (capacitor,
zener diode, etc.) should have very little leakage
current at the pin.
DS70118J-page 119
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
ADCBUF0
0280
ADCBUF1
0282
ADCBUF2
0284
ADCBUF3
0286
ADCBUF4
0288
ADCBUF5
028A
ADCBUF6
028C
ADCBUF7
028E
ADCBUF8
0290
ADCBUF9
0292
ADCBUFA
0294
ADCBUFB
0296
ADCBUFC
0298
ADCBUFD
029A
ADCBUFE
029C
ADCBUFF
029E
ADCON1
02A0
ADON
ADSIDL
FORM<1:0>
ADCON2
02A2
CSCNA
CHPS<1:0>
ADCON3
02A4
ADCHS
02A6
ADPCFG
02A8
ADCSSL
Legend:
02AA
Note:
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
VCFG<2:0>
CH123NB<1:0>
Bit 9
Bit 8
SAMC<4:0>
CH123SB
CH0NB
CH0SB<3:0>
Bit 7
Bit 6
Bit 5
SSRC<2:0>
BUFS
ADRC
CH123NA<1:0>
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset State
ASAM
SMPI<3:0>
SAMP
DONE
BUFM
ALTS
ADCS<5:0>
CH0SA<3:0>
CH123SA
CH0NA
PCFG5
PCFG4
PCFG3
CSSL5
CSSL4
CSSL3
dsPIC30F2010
DS70118J-page 120
TABLE 18-2:
dsPIC30F2010
19.0
Note:
SYSTEM INTEGRATION
This data sheet summarizes features of
this group of dsPIC30F devices and is not
intended to be a complete reference
source. For more information on the CPU,
peripherals, register descriptions and
general device functionality, refer to the
dsPIC30F Family Reference Manual
(DS70046). For more information on the
device instruction set and programming,
refer to the 16-bit MCU and DSC Programmers
Reference
Manual
(DS70157).
There are several features intended to maximize system reliability, minimize cost through elimination of
external components, provide Power-Saving Operating
modes and offer code protection:
Oscillator Selection
Reset
- Power-on Reset (POR)
- Power-up Timer (PWRT)
- Oscillator Start-up Timer (OST)
- Programmable Brown-out Reset (BOR)
Watchdog Timer (WDT)
Power-Saving modes (Sleep and Idle)
Code Protection
Unit ID Locations
In-Circuit Serial Programming (ICSP)
programming capability
19.1
DS70118J-page 121
dsPIC30F2010
TABLE 19-1:
Oscillator Mode
Description
XTL
XT
XT w/ PLL 4x
XT w/ PLL 8x
XT w/ PLL 16x
LP
HS
EC
ECIO
EC w/ PLL 4x
EC w/ PLL 8x
EC w/ PLL 16x
ERC
ERCIO
FRC
LPRC
DS70118J-page 122
dsPIC30F2010
FIGURE 19-1:
OSC1
OSC2
Primary
Oscillator
PLL
x4, x8, x16
PLL
Lock
COSC<1:0>
Primary Osc
NOSC<1:0>
Primary
Oscillator
Stability Detector
POR Done
OSWEN
Oscillator
Start-up
Timer
Clock
Secondary Osc
Switching
and Control
Block
SOSCO
SOSCI
32 kHz LP
Oscillator
Secondary
Oscillator
Stability Detector
2
POST<1:0>
Internal Fast RC
Oscillator (FRC)
FRC
Internal Low
Power RC
Oscillator (LPRC)
LPRC
FCKSM<1:0>
2
Programmable
Clock Divider System
Clock
Fail-Safe Clock
Monitor (FSCM)
CF
Oscillator Trap
to Timer1
DS70118J-page 123
dsPIC30F2010
19.2
Oscillator Configurations
19.2.1
19.2.2
b)
TABLE 19-2:
Oscillator Mode
Oscillator
Source
FOS1
FOS0
FPR3
FPR2
FPR1
FPR0
OSC2 Function
EC
ECIO
EC w/ PLL 4x
EC w/ PLL 8x
EC w/ PLL 16x
ERC
ERCIO
XT
XT w/ PLL 4x
XT w/ PLL 8x
XT w/ PLL 16x
XTL
HS
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
Primary
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
0
0
1
1
1
1
0
0
1
0
0
1
1
0
0
0
0
1
1
0
1
1
0
1
0
1
1
0
0
1
0
1
x
x
CLKO
I/O
I/O
I/O
I/O
CLKO
I/O
OSC2
OSC2
OSC2
OSC2
OSC2
OSC2
LP
Secondary
FRC
Internal FRC
LPRC
Internal LPRC
Note 1:
2:
The OSC2 pin is either usable as a general-purpose I/O pin or is completely unusable, depending on the
Primary Oscillator mode selection (FPR<3:0>).
Note that the OSC1 pin cannot be used as an I/O pin, even if the Secondary Oscillator or an internal clock
source is selected at all times.
DS70118J-page 124
dsPIC30F2010
19.2.3
LP OSCILLATOR CONTROL
19.2.4
TABLE 19-3:
FIN
PLL
Multiplier
FOUT
4 MHz-10 MHz
4 MHz-10 MHz
4 MHz-7.5 MHz
x4
x8
x16
16 MHz-40 MHz
32 MHz-80 MHz
64 MHz-120 MHz
19.2.5
TABLE 19-4:
TUN<3:0>
Bits
0111
0110
0101
0100
0011
0010
0001
0000
1111
1110
1101
1100
1011
1010
1001
1000
19.2.6
FRC TUNING
FRC Frequency
+ 10.5%
+ 9.0%
+ 7.5%
+ 6.0%
+ 4.5%
+ 3.0%
+ 1.5%
Center Frequency (oscillator is
running at calibrated frequency)
- 1.5%
- 3.0%
- 4.5%
- 6.0%
- 7.5%
- 9.0%
- 10.5%
- 12.0%
LOW-POWER RC OSCILLATOR
(LPRC)
DS70118J-page 125
dsPIC30F2010
19.2.7
Primary
Secondary
Internal FRC
Internal LPRC
19.2.8
PROTECTION AGAINST
ACCIDENTAL WRITES TO OSCCON
DS70118J-page 126
dsPIC30F2010
19.3
Reset
19.3.1
Different registers are affected in different ways by various Reset conditions. Most registers are not affected
by a WDT wake-up, since this is viewed as the resumption of normal operation. Status bits from the RCON
register are set or cleared differently in different Reset
situations, as indicated in Table 19-5. These bits are
used in software to determine the nature of the Reset.
FIGURE 19-2:
RESET
Instruction
Digital
Glitch Filter
MCLR
Sleep or Idle
WDT
Module
POR
VDD Rise
Detect
VDD
Brown-out
Reset
BOR
BOREN
R
SYSRST
Trap Conflict
Illegal Opcode/
Uninitialized W Register
DS70118J-page 127
dsPIC30F2010
FIGURE 19-3:
INTERNAL POR
TOST
OST TIME-OUT
TPWRT
PWRT TIME-OUT
INTERNAL Reset
FIGURE 19-4:
VDD
MCLR
INTERNAL POR
TOST
OST TIME-OUT
TPWRT
PWRT TIME-OUT
INTERNAL Reset
FIGURE 19-5:
VDD
MCLR
INTERNAL POR
TOST
OST TIME-OUT
TPWRT
PWRT TIME-OUT
INTERNAL Reset
DS70118J-page 128
dsPIC30F2010
19.3.1.1
19.3.1.2
FIGURE 19-6:
VDD
D
19.3.2
BOR: PROGRAMMABLE
BROWN-OUT RESET
The BOR module is based on an internal voltage reference circuit. The main purpose of the BOR module is to
generate a device Reset when a brown-out condition
occurs. Brown-out conditions are generally caused by
glitches on the AC mains (i.e., missing portions of the
AC cycle waveform due to bad power transmission
lines or voltage sags due to excessive current draw
when a large inductive load is turned on).
MCLR
dsPIC30F
2.6V-2.71V
4.1V-4.4V
4.58V-4.73V
The BOR voltage trip points indicated here
are nominal values provided for design
guidance only.
R
R1
Note:
EXTERNAL POWER-ON
RESET CIRCUIT (FOR
SLOW VDD POWER-UP)
Note:
DS70118J-page 129
dsPIC30F2010
Table 19-5 shows the Reset conditions for the RCON
Register. Since the control bits within the RCON register are R/W, the information in the table implies that all
the bits are negated prior to the action specified in the
condition column.
TABLE 19-5:
Condition
Program
Counter
Power-on Reset
0x000000
Brown-out Reset
0x000000
0x000000
0x000000
0x000000
0x000000
0x000000
PC + 2
PC +
2(1)
0x000004
Trap Reset
0x000000
0x000000
WDT Wake-up
Note 1:
When the wake-up is due to an enabled interrupt, the PC is loaded with the corresponding interrupt vector.
TABLE 19-6:
Condition
Program
Counter
Power-on Reset
0x000000
Brown-out Reset
0x000000
0x000000
0x000000
0x000000
0x000000
0x000000
PC + 2
PC +
2(1)
0x000004
Trap Reset
0x000000
0x000000
WDT Wake-up
Legend: u = unchanged
Note 1: When the wake-up is due to an enabled interrupt, the PC is loaded with the corresponding interrupt vector.
DS70118J-page 130
dsPIC30F2010
19.4
19.4.1
19.4.2
If a WDT times out during Sleep, the device will wakeup. The WDTO bit in the RCON register will be cleared
to indicate a wake-up resulting from a WDT time-out.
Setting FWDTEN = 0 allows user software to enable/
disable the Watchdog Timer via the SWDTEN
(RCON<5>) control bit.
19.5
Power-Saving Modes
19.5.1
SLEEP MODE
DS70118J-page 131
dsPIC30F2010
All Resets will wake-up the processor from Sleep
mode. Any Reset, other than POR, will set the Sleep
status bit. In a POR, the Sleep bit is cleared.
If Watchdog Timer is enabled, then the processor will
wake-up from Sleep mode upon WDT time-out. The
Sleep and WDTO status bits are both set.
19.5.2
IDLE MODE
3.
4.
5.
Note:
19.6
DS70118J-page 132
19.7
In-Circuit Debugger
2.
TABLE 19-7:
SFR Name
RCON
OSCCON
Legend:
Note 1:
Addr.
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
0740
TRAPR
IOPUWR
BGST
EXTR
SWR
SWDTEN
WDTO
SLEEP
IDLE
BOR
LOCK
CF
LPOSCEN
Bit 7
Bit 6
Bit 5
Bit 4
0742
TUN3
TUN2
COSC<1:0>
TUN1 TUN0 NOSC<1:0>
POST<1:0>
= unimplemented bit
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
TABLE 19-8:
Name
Address
Bit 0
POR
Reset State
Depends on type of Reset
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
FWPSA<1:0>
PWMPIN
HPOL
LPOL
BOREN
BORV<1:0>
Reserved(2)
Reserved(2)
Reserved(2)
Reserved(2)
FCKSM<1:0>
Bit 9
Bit 8
FOSC
F80000
FWDT
F80002
FWDTEN
FBORPOR F80004
MCLREN
F80006
FSS
F80008
FGS
F8000A
FICD
F8000C
BKBUG
COE
Legend:
Note 1:
2:
= unimplemented bit
Refer to the dsPIC30F Family Reference Manual (DS70046) for descriptions of register bit fields.
Reserved bits read as 1 and must be programmed as 1.
FBS
Bit 1
FOS<1:0>
Reserved(2)
Bit 3
Bit 2
Bit 1
Bit 0
FPR<3:0>
FWPSB<3:0>
FPWRT<1:0>
Reserved(2)
Reserved(2)
GCP
GWRP
ICS<1:0>
dsPIC30F2010
DS70118J-page 133
dsPIC30F2010
NOTES:
DS70118J-page 134
dsPIC30F2010
20.0
Note:
DS70118J-page 135
dsPIC30F2010
Most single-word instructions are executed in a single
instruction cycle, unless a conditional test is true or the
program counter is changed as a result of the instruction. In these cases, the execution takes two instruction
cycles with the additional instruction cycle(s) executed
as a NOP. Notable exceptions are the BRA (unconditional/computed branch), indirect CALL/GOTO, all table
reads and writes and RETURN/RETFIE instructions,
which are single-word instructions, but take two or
three cycles. Certain instructions that involve skipping
over the subsequent instruction, require either two or
TABLE 20-1:
Field
#text
(text)
[text]
{ }
<n:m>
.b
.d
.S
.w
Acc
AWB
bit4
C, DC, N, OV, Z
Expr
f
lit1
lit4
lit5
lit8
lit10
lit14
lit16
lit23
None
OA, OB, SA, SB
PC
Slit10
Slit16
Slit6
DS70118J-page 136
Description
Means literal defined by text
Means content of text
Means the location addressed by text
Optional field or operation
Register bit field
Byte mode selection
Double word mode selection
Shadow register select
Word mode selection (default)
One of two accumulators {A, B}
Accumulator write-back destination address register {W13, [W13] + = 2}
4-bit bit selection field (used in word addressed instructions) {0...15}
MCU status bits: Carry, Digit Carry, Negative, Overflow, Zero
Absolute address, label or expression (resolved by the linker)
File register address {0x0000...0x1FFF}
1-bit unsigned literal {0,1}
4-bit unsigned literal {0...15}
5-bit unsigned literal {0...31}
8-bit unsigned literal {0...255}
10-bit unsigned literal {0...255} for Byte mode, {0:1023} for Word mode
14-bit unsigned literal {0...16384}
16-bit unsigned literal {0...65535}
23-bit unsigned literal {0...8388608}; LSB must be 0
Field does not require an entry, may be blank
DSP status bits: ACCA Overflow, ACCB Overflow, ACCA Saturate, ACCB Saturate
Program Counter
10-bit signed literal {-512...511}
16-bit signed literal {-32768...32767}
6-bit signed literal {-16...16}
dsPIC30F2010
TABLE 20-1:
Field
Wb
Wd
Wdo
Wm,Wn
Wm*Wm
Wm*Wn
Wn
Wnd
Wns
WREG
Ws
Wso
Wx
Wxd
Wy
Wyd
Description
Base W register {W0..W15}
Destination W register {Wd, [Wd], [Wd++], [Wd--], [++Wd], [--Wd]}
Destination W register
{Wnd, [Wnd], [Wnd++], [Wnd--], [++Wnd], [--Wnd], [Wnd+Wb]}
Dividend, Divisor working register pair (direct addressing)
Multiplicand and Multiplier working register pair for Square instructions
{W4 * W4,W5 * W5,W6 * W6,W7 * W7}
Multiplicand and Multiplier working register pair for DSP instructions
{W4 * W5,W4 * W6,W4 * W7,W5 * W6,W5 * W7,W6 * W7}
One of 16 working registers {W0..W15}
One of 16 destination working registers {W0..W15}
One of 16 source working registers {W0..W15}
W0 (working register used in file register instructions)
Source W register {Ws, [Ws], [Ws++], [Ws--], [++Ws], [--Ws]}
Source W register
{Wns, [Wns], [Wns++], [Wns--], [++Wns], [--Wns], [Wns+Wb]}
X data space prefetch address register for DSP instructions
{[W8] + = 6, [W8] + = 4, [W8] + = 2, [W8], [W8] - = 6, [W8] - = 4, [W8] - = 2,
[W9] + = 6, [W9] + = 4, [W9] + = 2, [W9], [W9] - = 6, [W9] - = 4, [W9] - = 2,
[W9 + W12],none}
X data space prefetch destination register for DSP instructions {W4..W7}
Y data space prefetch address register for DSP instructions
{[W10] + = 6, [W10] + = 4, [W10] + = 2, [W10], [W10] - = 6, [W10] - = 4, [W10] - = 2,
[W11] + = 6, [W11] + = 4, [W11] + = 2, [W11], [W11] - = 6, [W11] - = 4, [W11] - = 2,
[W11 + W12], none}
Y data space prefetch destination register for DSP instructions {W4..W7}
DS70118J-page 137
dsPIC30F2010
TABLE 20-2:
Base
Instr
#
Assembly
Mnemonic
ADD
5
6
7
8
9
10
ADDC
AND
ASR
BCLR
BRA
BSET
BSW
BTG
BTSC
Description
# of
word
s
# of
cycles
Status Flags
Affected
OA,OB,SA,SB
ADD
Acc
Add Accumulators
ADD
f = f + WREG
C,DC,N,OV,Z
ADD
f,WREG
WREG = f + WREG
C,DC,N,OV,Z
ADD
#lit10,Wn
Wd = lit10 + Wd
C,DC,N,OV,Z
ADD
Wb,Ws,Wd
Wd = Wb + Ws
C,DC,N,OV,Z
ADD
Wb,#lit5,Wd
Wd = Wb + lit5
C,DC,N,OV,Z
ADD
Wso,#Slit4,Acc
OA,OB,SA,SB
ADDC
f = f + WREG + (C)
C,DC,N,OV,Z
ADDC
f,WREG
C,DC,N,OV,Z
ADDC
#lit10,Wn
Wd = lit10 + Wd + (C)
C,DC,N,OV,Z
ADDC
Wb,Ws,Wd
Wd = Wb + Ws + (C)
C,DC,N,OV,Z
C,DC,N,OV,Z
ADDC
Wb,#lit5,Wd
Wd = Wb + lit5 + (C)
AND
f = f .AND. WREG
N,Z
AND
f,WREG
N,Z
AND
#lit10,Wn
Wd = lit10 .AND. Wd
N,Z
AND
Wb,Ws,Wd
Wd = Wb .AND. Ws
N,Z
N,Z
AND
Wb,#lit5,Wd
Wd = Wb .AND. lit5
ASR
C,N,OV,Z
ASR
f,WREG
C,N,OV,Z
ASR
Ws,Wd
C,N,OV,Z
ASR
Wb,Wns,Wnd
N,Z
ASR
Wb,#lit5,Wnd
N,Z
BCLR
f,#bit4
Bit Clear f
None
BCLR
Ws,#bit4
Bit Clear Ws
None
BRA
C,Expr
Branch if Carry
1 (2)
None
BRA
GE,Expr
1 (2)
None
BRA
GEU,Expr
1 (2)
None
BRA
GT,Expr
1 (2)
None
BRA
GTU,Expr
1 (2)
None
BRA
LE,Expr
1 (2)
None
BRA
LEU,Expr
1 (2)
None
BRA
LT,Expr
1 (2)
None
BRA
LTU,Expr
1 (2)
None
BRA
N,Expr
Branch if Negative
1 (2)
None
BRA
NC,Expr
1 (2)
None
BRA
NN,Expr
1 (2)
None
BRA
NOV,Expr
1 (2)
None
BRA
NZ,Expr
1 (2)
None
BRA
OA,Expr
1 (2)
None
BRA
OB,Expr
1 (2)
None
BRA
OV,Expr
Branch if Overflow
1 (2)
None
BRA
SA,Expr
1 (2)
None
BRA
SB,Expr
1 (2)
None
BRA
Expr
Branch Unconditionally
None
BRA
Z,Expr
Branch if Zero
1 (2)
None
BRA
Wn
Computed Branch
None
BSET
f,#bit4
Bit Set f
None
BSET
Ws,#bit4
Bit Set Ws
None
BSW.C
Ws,Wb
None
BSW.Z
Ws,Wb
None
BTG
f,#bit4
Bit Toggle f
None
BTG
Ws,#bit4
Bit Toggle Ws
None
BTSC
f,#bit4
1
(2 or 3)
None
BTSC
Ws,#bit4
1
(2 or 3)
None
DS70118J-page 138
dsPIC30F2010
TABLE 20-2:
Base
Instr
#
Assembly
Mnemonic
11
BTSS
12
13
14
15
BTST
BTSTS
CALL
CLR
1
(2 or 3)
None
BTSS
Ws,#bit4
1
(2 or 3)
None
BTST
f,#bit4
Bit Test f
BTST.C
Ws,#bit4
Bit Test Ws to C
BTST.Z
Ws,#bit4
Bit Test Ws to Z
BTST.C
Ws,Wb
BTST.Z
Ws,Wb
BTSTS
f,#bit4
BTSTS.C
Ws,#bit4
BTSTS.Z
Ws,#bit4
CALL
lit23
Call subroutine
None
CALL
Wn
None
CLR
f = 0x0000
None
CLR
WREG
WREG = 0x0000
None
CLR
Ws
Ws = 0x0000
None
CLR
Acc,Wx,Wxd,Wy,Wyd,AWB
Clear Accumulator
OA,OB,SA,SB
WDTO,Sleep
f=f
N,Z
f,WREG
WREG = f
N,Z
COM
Ws,Wd
Wd = Ws
N,Z
CP
C,DC,N,OV,Z
CP
Wb,#lit5
C,DC,N,OV,Z
CP
Wb,Ws
C,DC,N,OV,Z
CP0
C,DC,N,OV,Z
CP0
Ws
C,DC,N,OV,Z
CPB
C,DC,N,OV,Z
CPB
Wb,#lit5
C,DC,N,OV,Z
CPB
Wb,Ws
C,DC,N,OV,Z
17
COM
COM
COM
20
CP0
CPB
Status Flags
Affected
CLRWDT
19
# of
cycles
f,#bit4
CLRWDT
CP
# of
word
s
BTSS
16
18
Description
21
CPSEQ
CPSEQ
Wb, Wn
1
(2 or 3)
None
22
CPSGT
CPSGT
Wb, Wn
1
(2 or 3)
None
23
CPSLT
CPSLT
Wb, Wn
1
(2 or 3)
None
24
CPSNE
CPSNE
Wb, Wn
1
(2 or 3)
None
25
DAW
DAW
Wn
Wn = decimal adjust Wn
26
DEC
DEC
f=f-1
C,DC,N,OV,Z
DEC
f,WREG
WREG = f -1
C,DC,N,OV,Z
DEC
Ws,Wd
Wd = Ws - 1
C,DC,N,OV,Z
DEC2
f=f-2
C,DC,N,OV,Z
DEC2
f,WREG
WREG = f -2
C,DC,N,OV,Z
DEC2
Ws,Wd
Wd = Ws - 2
C,DC,N,OV,Z
27
DEC2
28
DISI
DISI
#lit14
None
29
DIV
DIV.S
Wm,Wn
18
N,Z,C, OV
DIV.SD
Wm,Wn
18
N,Z,C, OV
DIV.U
Wm,Wn
18
N,Z,C, OV
DIV.UD
Wm,Wn
18
N,Z,C, OV
30
DIVF
DIVF
Wm,Wn
18
N,Z,C, OV
31
DO
DO
#lit14,Expr
None
DO
Wn,Expr
None
32
ED
ED
Wm*Wm,Acc,Wx,Wy,Wxd
OA,OB,OAB,
SA,SB,SAB
33
EDAC
EDAC
Wm*Wm,Acc,Wx,Wy,Wxd
Euclidean Distance
OA,OB,OAB,
SA,SB,SAB
DS70118J-page 139
dsPIC30F2010
TABLE 20-2:
Base
Instr
#
Assembly
Mnemonic
Assembly Syntax
Description
# of
word
s
# of
cycles
Status Flags
Affected
34
EXCH
EXCH
Wns,Wnd
None
35
FBCL
FBCL
Ws,Wnd
36
FF1L
FF1L
Ws,Wnd
37
FF1R
FF1R
Ws,Wnd
38
GOTO
GOTO
Expr
Go to address
None
GOTO
Wn
Go to indirect
None
INC
f=f+1
C,DC,N,OV,Z
INC
f,WREG
WREG = f + 1
C,DC,N,OV,Z
INC
Ws,Wd
Wd = Ws + 1
C,DC,N,OV,Z
INC2
f=f+2
C,DC,N,OV,Z
INC2
f,WREG
WREG = f + 2
C,DC,N,OV,Z
INC2
Ws,Wd
Wd = Ws + 2
C,DC,N,OV,Z
IOR
f = f .IOR. WREG
N,Z
IOR
f,WREG
N,Z
IOR
#lit10,Wn
Wd = lit10 .IOR. Wd
N,Z
IOR
Wb,Ws,Wd
Wd = Wb .IOR. Ws
N,Z
39
40
41
INC
INC2
IOR
IOR
Wb,#lit5,Wd
Wd = Wb .IOR. lit5
N,Z
LAC
LAC
Wso,#Slit4,Acc
Load Accumulator
OA,OB,OAB,
SA,SB,SAB
43
LNK
LNK
#lit14
None
44
LSR
LSR
C,N,OV,Z
LSR
f,WREG
C,N,OV,Z
LSR
Ws,Wd
C,N,OV,Z
LSR
Wb,Wns,Wnd
N,Z
LSR
Wb,#lit5,Wnd
N,Z
MAC
Wm*Wn,Acc,Wx,Wxd,Wy,Wyd,
AWB
OA,OB,OAB,
SA,SB,SAB
MAC
Wm*Wm,Acc,Wx,Wxd,Wy,Wyd
OA,OB,OAB,
SA,SB,SAB
MOV
f,Wn
Move f to Wn
None
MOV
Move f to f
N,Z
MOV
f,WREG
Move f to WREG
N,Z
MOV
#lit16,Wn
None
MOV.b
#lit8,Wn
None
MOV
Wn,f
Move Wn to f
None
MOV
Wso,Wdo
Move Ws to Wd
None
MOV
WREG,f
Move WREG to f
N,Z
MOV.D
Wns,Wd
None
MOV.D
Ws,Wnd
None
42
45
46
MAC
MOV
47
MOVSAC
MOVSAC
Acc,Wx,Wxd,Wy,Wyd,AWB
None
48
MPY
MPY
Wm*Wn,Acc,Wx,Wxd,Wy,Wyd
Multiply Wm by Wn to Accumulator
OA,OB,OAB,
SA,SB,SAB
MPY
Wm*Wm,Acc,Wx,Wxd,Wy,Wyd
Square Wm to Accumulator
OA,OB,OAB,
SA,SB,SAB
49
MPY.N
MPY.N
Wm*Wn,Acc,Wx,Wxd,Wy,Wyd
None
50
MSC
MSC
Wm*Wm,Acc,Wx,Wxd,Wy,Wyd,
AWB
OA,OB,OAB,
SA,SB,SAB
51
MUL
MUL.SS
Wb,Ws,Wnd
None
MUL.SU
Wb,Ws,Wnd
None
MUL.US
Wb,Ws,Wnd
None
MUL.UU
Wb,Ws,Wnd
None
MUL.SU
Wb,#lit5,Wnd
None
MUL.UU
Wb,#lit5,Wnd
None
MUL
W3:W2 = f * WREG
None
DS70118J-page 140
dsPIC30F2010
TABLE 20-2:
Base
Instr
#
Assembly
Mnemonic
52
NEG
53
54
NOP
POP
PUSH
# of
word
s
# of
cycles
Status Flags
Affected
NEG
Acc
Negate Accumulator
OA,OB,OAB,
SA,SB,SAB
NEG
f=f+1
C,DC,N,OV,Z
NEG
f,WREG
WREG = f + 1
C,DC,N,OV,Z
NEG
Ws,Wd
Wd = Ws + 1
C,DC,N,OV,Z
NOP
No Operation
None
NOPR
No Operation
None
None
POP
Wdo
None
POP.D
Wnd
None
All
PUSH
None
PUSH
Wso
None
PUSH.D
Wns
None
None
WDTO,Sleep
POP
POP.S
55
Description
PUSH.S
56
PWRSAV
PWRSAV
#lit1
57
RCALL
RCALL
Expr
Relative Call
None
RCALL
Wn
Computed Call
None
REPEAT
#lit14
None
REPEAT
Wn
None
58
REPEAT
59
RESET
RESET
None
60
RETFIE
RETFIE
3 (2)
None
61
RETLW
RETLW
62
RETURN
RETURN
63
RLC
RLC
RLC
64
65
66
RLNC
RRC
RRNC
3 (2)
None
3 (2)
None
C,N,Z
f,WREG
C,N,Z
RLC
Ws,Wd
C,N,Z
RLNC
N,Z
RLNC
f,WREG
N,Z
N,Z
#lit10,Wn
RLNC
Ws,Wd
RRC
C,N,Z
RRC
f,WREG
C,N,Z
C,N,Z
RRC
Ws,Wd
RRNC
N,Z
RRNC
f,WREG
N,Z
RRNC
Ws,Wd
N,Z
67
SAC
SAC
Acc,#Slit4,Wdo
Store Accumulator
None
SAC.R
Acc,#Slit4,Wdo
None
68
SE
SE
Ws,Wnd
C,N,Z
69
SETM
SETM
f = 0xFFFF
None
SETM
WREG
WREG = 0xFFFF
None
70
71
SFTAC
SL
SETM
Ws
Ws = 0xFFFF
None
SFTAC
Acc,Wn
OA,OB,OAB,
SA,SB,SAB
SFTAC
Acc,#Slit6
OA,OB,OAB,
SA,SB,SAB
SL
f = Left Shift f
C,N,OV,Z
SL
f,WREG
C,N,OV,Z
SL
Ws,Wd
Wd = Left Shift Ws
C,N,OV,Z
SL
Wb,Wns,Wnd
N,Z
SL
Wb,#lit5,Wnd
N,Z
DS70118J-page 141
dsPIC30F2010
TABLE 20-2:
Base
Instr
#
Assembly
Mnemonic
72
SUB
73
74
75
76
SUBB
SUBR
SUBBR
SWAP
Description
# of
word
s
# of
cycles
Status Flags
Affected
SUB
Acc
Subtract Accumulators
OA,OB,OAB,
SA,SB,SAB
SUB
f = f - WREG
C,DC,N,OV,Z
SUB
f,WREG
WREG = f - WREG
C,DC,N,OV,Z
SUB
#lit10,Wn
Wn = Wn - lit10
C,DC,N,OV,Z
SUB
Wb,Ws,Wd
Wd = Wb - Ws
C,DC,N,OV,Z
SUB
Wb,#lit5,Wd
Wd = Wb - lit5
C,DC,N,OV,Z
SUBB
f = f - WREG - (C)
C,DC,N,OV,Z
SUBB
f,WREG
C,DC,N,OV,Z
SUBB
#lit10,Wn
Wn = Wn - lit10 - (C)
C,DC,N,OV,Z
SUBB
Wb,Ws,Wd
Wd = Wb - Ws - (C)
C,DC,N,OV,Z
SUBB
Wb,#lit5,Wd
Wd = Wb - lit5 - (C)
C,DC,N,OV,Z
SUBR
f = WREG - f
C,DC,N,OV,Z
SUBR
f,WREG
WREG = WREG - f
C,DC,N,OV,Z
SUBR
Wb,Ws,Wd
Wd = Ws - Wb
C,DC,N,OV,Z
SUBR
Wb,#lit5,Wd
Wd = lit5 - Wb
C,DC,N,OV,Z
SUBBR
f = WREG - f - (C)
C,DC,N,OV,Z
SUBBR
f,WREG
C,DC,N,OV,Z
SUBBR
Wb,Ws,Wd
Wd = Ws - Wb - (C)
C,DC,N,OV,Z
SUBBR
Wb,#lit5,Wd
Wd = lit5 - Wb - (C)
C,DC,N,OV,Z
SWAP.b
Wn
Wn = nibble swap Wn
None
SWAP
Wn
Wn = byte swap Wn
None
77
TBLRDH
TBLRDH
Ws,Wd
None
78
TBLRDL
TBLRDL
Ws,Wd
Read Prog<15:0> to Wd
None
79
TBLWTH
TBLWTH
Ws,Wd
None
80
TBLWTL
TBLWTL
Ws,Wd
Write Ws to Prog<15:0>
None
81
ULNK
ULNK
None
82
XOR
XOR
f = f .XOR. WREG
N,Z
XOR
f,WREG
N,Z
XOR
#lit10,Wn
Wd = lit10 .XOR. Wd
N,Z
XOR
Wb,Ws,Wd
Wd = Wb .XOR. Ws
N,Z
XOR
Wb,#lit5,Wd
Wd = Wb .XOR. lit5
N,Z
ZE
Ws,Wnd
Wnd = Zero-Extend Ws
C,Z,N
83
ZE
DS70118J-page 142
dsPIC30F2010
21.0
DEVELOPMENT SUPPORT
21.1
DS70118J-page 143
dsPIC30F2010
21.2
21.3
21.4
MPASM Assembler
21.5
21.6
DS70118J-page 144
dsPIC30F2010
21.7
21.8
21.9
MPLAB ICD 3 In-Circuit Debugger System is Microchip's most cost effective high-speed hardware
debugger/programmer for Microchip Flash Digital Signal Controller (DSC) and microcontroller (MCU)
devices. It debugs and programs PIC Flash microcontrollers and dsPIC DSCs with the powerful, yet easyto-use graphical user interface of MPLAB Integrated
Development Environment (IDE).
The MPLAB ICD 3 In-Circuit Debugger probe is connected to the design engineer's PC using a high-speed
USB 2.0 interface and is connected to the target with a
connector compatible with the MPLAB ICD 2 or MPLAB
REAL ICE systems (RJ-11). MPLAB ICD 3 supports all
MPLAB ICD 2 headers.
DS70118J-page 145
dsPIC30F2010
21.11 PICkit 2 Development
Programmer/Debugger and
PICkit 2 Debug Express
21.13 Demonstration/Development
Boards, Evaluation Kits, and
Starter Kits
DS70118J-page 146
dsPIC30F2010
22.0
ELECTRICAL CHARACTERISTICS
This section provides an overview of dsPIC30F electrical characteristics. Additional information will be provided in future
revisions of this document as it becomes available.
For detailed information about the dsPIC30F architecture and core, refer to dsPIC30F Family Reference Manual
(DS70046).
Absolute maximum ratings for the dsPIC30F family are listed below. Exposure to these maximum rating conditions for
extended periods may affect device reliability. Functional operation of the device at these or any other conditions above
the parameters indicated in the operation listings of this specification is not implied.
Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the
device. This is a stress rating only and functional operation of the device at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.
DS70118J-page 147
dsPIC30F2010
22.1
DC Characteristics
TABLE 22-1:
VDD Range
Temp Range
dsPIC30F2010-30I
dsPIC30F2010-20E
30
4.5-5.5V
-40C to 85C
4.5-5.5V
-40C to 125C
20
3.0-3.6V
-40C to 85C
20
3.0-3.6V
-40C to 125C
15
2.5-3.0V
-40C to 85C
10
TABLE 22-2:
Symbol
Min
Typ
Max
Unit
TJ
-40
+125
TA
-40
+85
TJ
-40
+150
TA
-40
+125
dsPIC30F2010-30I
dsPIC30F2010-20E
Power Dissipation:
Internal chip power dissipation:
P INT = V DD I DD I OH
TABLE 22-3:
PINT + PI/O
PDMAX
(TJ - TA)/ JA
PD
Symbol
JA
JA
JA
Typ
Max
Unit
Notes
48.3
C/W
33.7
C/W
42
C/W
Junction to ambient thermal resistance, Theta-ja ( JA) numbers are achieved by package simulations.
DS70118J-page 148
dsPIC30F2010
TABLE 22-4:
DC CHARACTERISTICS
Param
No.
Symbol
Characteristic
Min
Typ(1)
Max
Units
2.5
5.5
Industrial temperature
Extended temperature
Conditions
Operating Voltage(2)
DC10
VDD
Supply Voltage
DC11
VDD
Supply Voltage
3.0
5.5
DC12
VDR
1.75
DC16
VPOR
VSS
DC17
SVDD
0.05
Note 1:
2:
3:
Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
These parameters are characterized but not tested in manufacturing.
This is the limit to which VDD can be lowered without losing RAM data.
DS70118J-page 149
dsPIC30F2010
TABLE 22-5:
DC CHARACTERISTICS
Parameter
No.
Typical
Max
Units
Conditions
DS70118J-page 150
dsPIC30F2010
TABLE 22-6:
DC CHARACTERISTICS
Parameter
No.
Typical
Max
Units
Conditions
1.5
3.0
mA
25C
DC51b
1.5
3.0
mA
85C
DC51c
1.5
3.0
mA
125C
DC51e
4.1
mA
25C
DC51f
3.6
mA
85C
DC51g
3.5
mA
125C
DC50a
mA
25C
DC50b
mA
85C
DC50c
mA
125C
DC50e
mA
25C
DC50f
mA
85C
DC50g
mA
125C
DC43a
mA
25C
DC43b
mA
85C
DC43c
mA
125C
DC43e
10
15
mA
25C
DC43f
10
15
mA
85C
DC43g
10
15
mA
125C
DC44a
11
18
mA
25C
DC44b
12
18
mA
85C
DC44c
12
18
mA
125C
DC44e
20
30
mA
25C
DC44f
20
30
mA
85C
DC44g
20
30
mA
125C
DC47a
20
30
mA
25C
DC47b
21
30
mA
85C
DC47d
35
45
mA
25C
DC47e
35
45
mA
85C
DC47f
35
45
mA
125C
DC49a
49
65
mA
25C
DC49b
50
65
mA
85C
Note 1:
2:
3.3V
0.128 MIPS
LPRC (512 kHz)
5V
3.3V
(1.8 MIPS)
FRC (7.37MHz)
5V
3.3V
4 MIPS EC mode, 4X PLL
5V
3.3V
10 MIPS EC mode, 4X PLL
5V
3.3V
20 MIPS EC mode, 8X PLL
5V
5V
Data in Typical column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only
and are not tested.
Base IIDLE current is measured with core off, clock on and all modules turned off.
DS70118J-page 151
dsPIC30F2010
TABLE 22-7:
DC CHARACTERISTICS
Parameter
No.
Typical
Max
Units
Conditions
0.05
25C
DC60b
25
85C
DC60c
20
50
125C
DC60e
0.1
25C
DC60f
35
85C
DC60g
40
200
125C
DC61a
30
45
25C
DC61b
34
51
85C
DC61c
46
69
125C
DC61e
35
53
25C
DC61f
39
59
85C
DC61g
40
60
125C
DC62a
10
25C
DC62b
10
85C
DC62c
10
125C
DC62e
15
25C
DC62f
15
85C
DC62g
15
125C
DC63a
25C
DC63b
85C
DC63c
7.5
125C
DC63e
10
15
25C
DC63f
15
85C
10
15
125C
DC63g
Note 1:
2:
3.3V
Base Power Down Current(2)
5V
3.3V
Watchdog Timer Current: IWDT(2)
5V
3.3V
Timer 1 w/32 kHz Crystal: ITI32(2)
5V
3.3V
BOR On: IBOR(2)
5V
Base IPD is measured with all peripherals and clocks shut down. All I/Os are configured as inputs and
pulled high. LVD, BOR, WDT, etc. are all switched off.
The current is the additional current consumed when the module is enabled. This current should be
added to the base IPD current.
DS70118J-page 152
dsPIC30F2010
TABLE 22-8:
DC CHARACTERISTICS
Param
Symbol
No.
VIL
Characteristic
Min
Typ(1)
Max
Units
Conditions
DI10
I/O pins:
with Schmitt Trigger buffer
VSS
0.2 VDD
DI15
MCLR
VSS
0.2 VDD
DI16
VSS
0.2 VDD
DI17
VSS
0.3 VDD
DI18
SDA, SCL
VSS
0.3 VDD
SMBus disabled
SDA, SCL
VSS
0.8
SMBus enabled
I/O pins:
with Schmitt Trigger buffer
0.8 VDD
VDD
DI25
MCLR
0.8 VDD
VDD
DI26
VDD
DI19
VIH
DI20
mode)(3)
DI27
OSC1 (in RC
0.9 VDD
VDD
DI28
SDA, SCL
0.7 VDD
VDD
SMBus disabled
SDA, SCL
2.1
VDD
SMBus enabled
50
250
400
DI29
ICNPU
IIL
DI30
DI50
I/O ports
0.01
DI51
0.50
1.3
DI55
MCLR
0.05
DI56
OSC1
0.05
Note 1:
2:
3:
4:
5:
Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
These parameters are characterized but not tested in manufacturing.
In RC oscillator configuration, the OSC1/CLKl pin is a Schmitt Trigger input. It is not recommended that
the dsPIC30F device be driven with an external clock while in RC mode.
The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified
levels represent normal operating conditions. Higher leakage current may be measured at different input
voltages.
Negative current is defined as current sourced by the pin.
DS70118J-page 153
dsPIC30F2010
TABLE 22-9:
DC CHARACTERISTICS
Param
Symbol
No.
VOL
DO10
Characteristic
VOH
Typ(1)
Max
Units
Conditions
DO16
Min
0.6
0.15
OSC2/CLKO
0.6
0.72
(2)
DO20
I/O ports
VDD 0.7
VDD - 0.2
DO26
OSC2/CLKO
VDD 0.7
VDD - 0.1
15
pF
COSC2
OSC2/SOSC2 pin
DO56
CIO
50
pF
RC or EC Osc mode
DO58
CB
SCL, SDA
400
pF
In I2C mode
Note 1:
2:
Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
These parameters are characterized but not tested in manufacturing.
FIGURE 22-1:
BO10
(Device in Brown-out Reset)
BO15
DS70118J-page 154
dsPIC30F2010
TABLE 22-10: ELECTRICAL CHARACTERISTICS: BOR
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
DC CHARACTERISTICS
Param
No.
BO10
Symbol
VBOR
Characteristic
BOR Voltage(2) on
VDD transition high to
low
BORV = 11(3)
Min
Typ(1)
Max
Units
Conditions
Not in operating
range
BORV = 10
2.6
2.71
BORV = 01
4.1
4.4
BORV = 00
4.58
4.73
mV
BO15
VBHYS
Note 1:
Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
These parameters are characterized but not tested in manufacturing.
11 values not in usable operating range.
2:
3:
DC CHARACTERISTICS
Param
Symbol
No.
Characteristic
Min
Typ(1)
Max
Units
Conditions
D120
ED
Byte Endurance
100K
1M
E/W
D121
VDRW
VMIN
5.5
D122
TDEW
0.8
2.6
ms
D123
TRETD
Characteristic Retention
40
100
Year
D124
IDEW
10
30
mA
Row Erase
-40 C TA +85C
Program Flash
Memory(2)
D130
EP
Cell Endurance
10K
100K
E/W
D131
VPR
VMIN
5.5
D132
VEB
4.5
5.5
D133
VPEW
3.0
5.5
D134
TPEW
0.8
2.6
ms
D135
TRETD
Characteristic Retention
40
100
Year
D137
IPEW
10
30
mA
Row Erase
D138
IEB
10
30
mA
Bulk Erase
Note 1:
2:
RTSP
DS70118J-page 155
dsPIC30F2010
22.2
The information contained in this section defines dsPIC30F AC characteristics and timing parameters.
AC CHARACTERISTICS
FIGURE 22-2:
VDD/2
RL
CL
Pin
VSS
CL
Pin
RL = 464
CL = 50 pF for all pins except OSC2
5 pF for OSC2 output
VSS
FIGURE 22-3:
Q1
Q2
Q3
Q4
Q1
OSC1
OS20
OS30
OS25
OS30
OS31
OS31
CLKO
OS40
DS70118J-page 156
OS41
dsPIC30F2010
TABLE 22-13: EXTERNAL CLOCK TIMING REQUIREMENTS
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
Symbol
No.
OS10
FOSC
Characteristic
Min
Typ(1)
Max
Units
DC
4
4
4
40
10
10
7.5
MHz
MHz
MHz
MHz
EC
EC with 4x PLL
EC with 8x PLL
EC with 16x PLL
Oscillator Frequency(2)
DC
0.4
4
4
4
4
10
31
7.37
512
4
4
10
10
10
7.5
25
33
MHz
MHz
MHz
MHz
MHz
MHz
MHz
kHz
MHz
kHz
RC
XTL
XT
XT with 4x PLL
XT with 8x PLL
XT with 16x PLL
HS
LP
FRC internal
LPRC internal
Conditions
OS20
TOSC
TOSC = 1/FOSC
OS25
TCY
33
DC
ns
(2)
OS30
TosL,
TosH
.45 x TOSC
ns
EC
OS31
TosR,
TosF
20
ns
EC
OS40
TckR
10
ns
OS41
TckF
10
ns
Note 1:
2:
3:
4:
Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
These parameters are characterized but not tested in manufacturing.
Instruction cycle period (TCY) equals four times the input oscillator time base period. All specified values
are based on characterization data for that particular oscillator type under standard operating conditions
with the device executing code. Exceeding these specified limits may result in an unstable oscillator
operation and/or higher than expected current consumption. All devices are tested to operate at Min
values with an external clock applied to the OSC1/CLKI pin. When an external clock input is used, the
Max cycle time limit is DC (no clock) for all devices.
Measurements are taken in EC or ERC modes. The CLKO signal is measured on the OSC2 pin. CLKO is
low for the Q1-Q2 period (1/2 TCY) and high for the Q3-Q4 period (1/2 TCY).
DS70118J-page 157
dsPIC30F2010
TABLE 22-14: PLL CLOCK TIMING SPECIFICATIONS (VDD = 2.5 TO 5.5 V)
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
Characteristic(1)
Symbol
Min
Typ(2)
Max
Units
Conditions
OS50
FPLLI
4
4
4
4
4
4
10
10
7.5(3)
10
10
7.5(3)
MHz
MHz
MHz
MHz
MHz
MHz
EC with 4x PLL
EC with 8x PLL
EC with 16x PLL
XT with 4x PLL
XT with 8x PLL
XT with 16x PLL
OS51
FSYS
16
120
MHz
OS52
TLOC
20
50
Note 1:
2:
3:
TABLE 22-15:
PLL JITTER
AC CHARACTERISTICS
Param
No.
Characteristic
OS61
x4 PLL
x8 PLL
x16 PLL
Note 1:
Typ(1)
Max
Units
Conditions
0.251
0.413
-40C TA +85C
0.251
0.413
-40C TA +125C
0.256
0.47
-40C TA +85C
0.256
0.47
-40C TA +125C
0.355
0.584
-40C TA +85C
0.355
0.584
-40C TA +125C
0.362
0.664
-40C TA +85C
0.362
0.664
-40C TA +125C
0.67
0.92
-40C TA +85C
0.632
0.956
-40C TA +85C
0.632
0.956
-40C TA +125C
DS70118J-page 158
dsPIC30F2010
TABLE 22-16: INTERNAL CLOCK TIMING EXAMPLES
Clock
Oscillator
Mode
EC
XT
Note 1:
2:
3:
FOSC
(MHz)(1)
TCY (sec)(2)
MIPs(3)
w/o PLL
MIPs(3)
w PLL x4
MIPs(3)
w PLL x8
MIPs(3)
w PLL x16
0.200
20.0
0.05
1.0
1.0
4.0
8.0
16.0
10
0.4
2.5
10.0
20.0
25
0.16
6.25
1.0
1.0
4.0
8.0
16.0
10
0.4
2.5
10.0
20.0
Param
No.
OS63
Characteristic
Typ
Max
Units
Conditions
Note 1:
Min
2.00
-40C TA +85C
VDD = 3.0-5.5V
5.00
-40C TA +125C
VDD = 3.0-5.5V
Frequency calibrated at 7.372 MHz 2%, 25C and 5V. TUN <3:0> bits can be used to compensate for
temperature drift.
Param
No.
Characteristic
OS65A
OS65B
OS65C
Note 1:
Typ
Max
Units
Conditions
-50
+50
-60
+60
-70
+70
VDD = 2.5V
DS70118J-page 159
dsPIC30F2010
FIGURE 22-4:
I/O Pin
(Input)
DI35
DI40
I/O Pin
(Output)
New Value
Old Value
DO31
DO32
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic(1,2,3)
Typ(4)
Max
Units
Conditions
20
ns
DO31
TIOR
DO32
TIOF
20
ns
DI35
TINP
20
ns
TRBP
2 TCY
DI40
Note 1:
2:
3:
4:
Min
These parameters are asynchronous events not related to any internal clock edges
Measurements are taken in RC mode and EC mode where CLKO output is 4 x TOSC.
These parameters are characterized but not tested in manufacturing.
Data in Typ column is at 5V, 25C unless otherwise stated.
DS70118J-page 160
dsPIC30F2010
FIGURE 22-5:
VDD
SY12
MCLR
SY10
Internal
POR
SY11
PWRT
Time-out
SY30
OSC
Time-out
Internal
Reset
Watchdog
Timer
Reset
SY20
SY13
SY13
I/O Pins
SY35
FSCM
Delay
TABLE 22-20: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER, POWER-UP TIMER
AND BROWN-OUT RESET TIMING REQUIREMENTS
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
Symbol
No.
Characteristic(1)
Min
Typ(2)
Max
Units
Conditions
SY10
TmcL
-40C to +85C
SY11
TPWRT
2
8
32
4
16
64
6
24
96
ms
SY12
TPOR
10
30
-40C to +85C
SY13
TIOZ
0.8
1.0
SY20
TWDT1
TWDT2
TWDT3
0.6
0.8
1.0
2.0
2.0
2.0
3.4
3.2
3.0
ms
ms
ms
SY25
TBOR
100
SY30
TOST
1024 TOSC
SY35
TFSCM
500
900
-40C to +85C
Note 1:
2:
3:
VDD = 2.5V
VDD = 3.3V, 10%
VDD = 5V, 10%
DS70118J-page 161
dsPIC30F2010
FIGURE 22-6:
0V
Enable Band Gap
(see Note)
Band Gap
Stable
SY40
Param
No.
SY40
Note 1:
2:
Symbol
TBGAP
Characteristic(1)
Min
Typ(2)
Max
Units
40
65
Conditions
Defined as the time between the
instant that the band gap is enabled
and the moment that the band gap
reference voltage is stable.
RCON<13>Status bit
DS70118J-page 162
dsPIC30F2010
FIGURE 22-7:
TxCK
Tx11
Tx10
Tx15
Tx20
OS60
TMRX
AC CHARACTERISTICS
Param
No.
TA10
TA11
Symbol
TTXH
TTXL
Characteristic
TxCK High Time
Min
Typ
Max
Units
Conditions
Synchronous,
no prescaler
0.5 TCY + 20
ns
Synchronous,
with prescaler
10
ns
Asynchronous
10
ns
Synchronous,
no prescaler
0.5 TCY + 20
ns
Synchronous,
with prescaler
10
ns
Asynchronous
TA15
TTXP
OS60
Ft1
TA20
10
ns
TCY + 10
ns
Greater of:
20 ns or
(TCY + 40)/N
N = prescale
value
(1, 8, 64, 256)
20
ns
DC
50
kHz
0.5 TCY
1.5 TCY
DS70118J-page 163
dsPIC30F2010
TABLE 22-23: TIMER2 EXTERNAL CLOCK TIMING REQUIREMENTS
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
TB10
TB11
TB15
Symbol
TtxH
TtxL
TtxP
Characteristic
TxCK High Time
Min
Typ
Max
Units
Synchronous,
no prescaler
0.5 TCY + 20
ns
Synchronous,
with prescaler
10
ns
Synchronous,
no prescaler
0.5 TCY + 20
ns
Synchronous,
with prescaler
10
ns
TCY + 10
ns
1.5 TCY
TB20
Greater of:
20 ns or
(TCY + 40)/N
0.5 TCY
Conditions
Must also meet
parameter TB15
N = prescale
value
(1, 8, 64, 256)
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic
Min
Typ
Max
Units
Conditions
TC10
TtxH
Synchronous
0.5 TCY + 20
ns
TC11
TtxL
Synchronous
0.5 TCY + 20
ns
TC15
TtxP
TCY + 10
ns
N = prescale
value
(1, 8, 64, 256)
1.5 TCY
Synchronous,
with prescaler
TC20
DS70118J-page 164
Greater of:
20 ns or
(TCY + 40)/N
0.5 TCY
dsPIC30F2010
FIGURE 22-8:
QEB
TQ11
TQ10
TQ15
TQ20
POSCNT
AC CHARACTERISTICS
Param
No.
Characteristic(1)
Symbol
Min
Typ
Max
Units
Conditions
TQ10
TtQH
Synchronous,
with prescaler
TCY + 20
ns
TQ11
TtQL
Synchronous,
with prescaler
TCY + 20
ns
TQ15
TtQP
2 * TCY + 40
ns
TQ20
0.5 TCY
1.5 TCY
ns
Note 1:
DS70118J-page 165
dsPIC30F2010
FIGURE 22-9:
IC10
IC11
IC15
AC CHARACTERISTICS
Param
No.
Characteristic(1)
Symbol
IC10
TccL
IC11
TccH
IC15
TccP
No Prescaler
Min
Max
Units
Conditions
0.5 TCY + 20
ns
With Prescaler
No Prescaler
10
ns
0.5 TCY + 20
ns
10
ns
(2 TCY + 40)/N
ns
With Prescaler
Note 1:
N = prescale
value (1, 4, 16)
FIGURE 22-10:
OCx
(Output Compare
or PWM Mode)
OC10
OC11
Param
Symbol
No.
Characteristic(1)
Typ(2)
Max
Units
Conditions
OC10
TccF
ns
OC11
TccR
ns
Note 1:
2:
DS70118J-page 166
dsPIC30F2010
FIGURE 22-11:
OC20
OCFA/OCFB
OC15
OCx
AC CHARACTERISTICS
Param
Symbol
No.
Characteristic(1)
Min
Typ(2)
Max
Units
Conditions
OC15 TFD
50
ns
OC20 TFLT
50
ns
Note 1:
2:
DS70118J-page 167
dsPIC30F2010
FIGURE 22-12:
FLTA/B
MP20
PWMx
FIGURE 22-13:
PWMx
Note: Refer to Figure 22-2 for load conditions.
Param
No.
Symbol
Characteristic(1)
Min
Typ(2)
Max
Units
ns
Conditions
MP10
TFPWM
MP11
TRPWM
ns
TFD
50
ns
TFH
50
ns
MP20
MP30
Note 1:
2:
DS70118J-page 168
dsPIC30F2010
FIGURE 22-14:
QEA
(input)
TQ30
TQ31
TQ35
QEB
(input)
TQ41
TQ40
TQ30
TQ31
TQ35
QEB
Internal
AC CHARACTERISTICS
Param
No.
Characteristic(1)
Symbol
Typ(2)
Max
Units
Conditions
TQ30
TQUL
6 TCY
ns
TQ31
TQUH
6 TCY
ns
TQ35
TQUIN
12 TCY
ns
TQ36
TQUP
3 TCY
ns
TQ40
TQUFL
3 * N * TCY
ns
TQ41
TQUFH
3 * N * TCY
ns
Note 1:
2:
DS70118J-page 169
dsPIC30F2010
FIGURE 22-15:
QEA
(input)
QEB
(input)
Ungated
Index
TQ50
TQ51
Index Internal
TQ55
Position Counter
Reset
Param
No.
Symbol
Min
Max
Units
Conditions
TQ50
TqIL
3 * N * TCY
ns
TQ51
TqiH
3 * N * TCY
ns
TQ55
Tqidxr
3 TCY
ns
Note 1:
2:
DS70118J-page 170
dsPIC30F2010
FIGURE 22-16:
SCKx
(CKP = 0)
SP11
SP10
SP21
SP20
SP20
SP21
SCKx
(CKP = 1)
SP35
MSb
SDOx
BIT14 - - - - - -1
SP31
SDIx
LSb
SP30
MSb IN
LSb IN
BIT14 - - - -1
SP40 SP41
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic(1)
Min
Typ(2)
Max
Units
Conditions
SP10
TscL
TCY/2
ns
See Note 3
SP11
TscH
TCY/2
ns
See Note 3
ns
See parameter
DO32
Time(4
SP20
TscF
SP21
TscR
ns
See parameter
DO31
SP30
TdoF
ns
See parameter
DO32
SP31
TdoR
ns
See parameter
DO31
SP35
TscH2doV,
TscL2doV
30
ns
SP40
TdiV2scH,
TdiV2scL
20
ns
SP41
TscH2diL,
TscL2diL
20
ns
Note 1:
2:
3:
4:
DS70118J-page 171
dsPIC30F2010
FIGURE 22-17:
SCKX
(CKP = 0)
SP11
SP10
SP21
SP20
SP20
SP21
SCKX
(CKP = 1)
SP35
BIT14 - - - - - -1
MSb
SDOX
SP40
SDIX
LSb
SP30,SP31
MSb IN
BIT14 - - - -1
LSb IN
SP41
AC CHARACTERISTICS
Param
No.
SP10
Symbol
TscL
Characteristic(1)
SCKX output low time(3)
time(3)
Min
Typ(2)
Max
Units
TCY/2
ns
See Note 3
Conditions
SP11
TscH
TCY/2
ns
See Note 3
SP20
TscF
ns
See parameter
DO32
SP21
TscR
ns
See parameter
DO31
SP30
TdoF
ns
See parameter
DO32
SP31
TdoR
ns
See parameter
DO31
SP35
30
ns
SP36
30
ns
SP40
20
ns
SP41
TscH2diL,
TscL2diL
20
ns
Note 1:
2:
3:
4:
DS70118J-page 172
dsPIC30F2010
FIGURE 22-18:
SSX
SP52
SP50
SCKX
(CKP = 0)
SP71
SP70
SP73
SP72
SP72
SP73
SCKX
(CKP = 1)
SP35
MSb
SDOX
LSb
BIT14 - - - - - -1
SP51
SP30,SP31
SDIX
MSb IN
BIT14 - - - -1
LSb IN
SP41
SP40
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic(1)
Min
Typ(2)
Max
Units
Conditions
SP70
TscL
SP71
SP72
SP73
SP30
TscH
TscF
TscR
TdoF
30
30
10
10
25
25
ns
ns
ns
ns
ns
See Note 3
See Note 3
See parameter
DO32
SP31
TdoR
ns
See parameter
DO31
SP35
SP40
SP41
SP50
SP51
SP52
Note
30
ns
SDOX Data Output Valid after
SCKX Edge
Setup Time of SDIX Data Input
20
ns
to SCKX Edge
20
ns
ns
TssL2scL
10
50
ns
ns
TscL2ssH
1: These parameters are characterized but not tested in manufacturing.
2: Data in Typ column is at 5V, 25C unless otherwise stated. Parameters are for design guidance only and
are not tested.
3: Assumes 50 pF load on all SPI pins.
TscH2doV,
TscL2doV
TdiV2scH,
TdiV2scL
DS70118J-page 173
dsPIC30F2010
FIGURE 22-19:
SSX
SP52
SP50
SCKX
(CKP = 0)
SP71
SP70
SP73
SP72
SP72
SP73
SCKX
(CKP = 1)
SP35
SP52
MSb
SDOX
BIT14 - - - - - -1
LSb
SP30,SP31
SDIX
MSb IN
BIT14 - - - -1
SP51
LSb IN
SP41
SP40
DS70118J-page 174
dsPIC30F2010
TABLE 22-35: SPI MODULE SLAVE MODE (CKE = 1) TIMING REQUIREMENTS
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic(1)
Min
Typ(2)
Max
Units
ns
See Note 3
See Note 3
Conditions
SP70
TscL
30
SP71
TscH
30
ns
SP72
TscF
10
25
ns
SP73
TscR
10
25
ns
(3)
SP30
TdoF
ns
See parameter
DO32
SP31
TdoR
ns
See parameter
DO31
SP35
30
ns
SP40
20
ns
SP41
20
ns
SP50
120
ns
SP51
10
50
ns
SP52
1.5 TCY + 40
ns
SP60
50
ns
Note 1:
2:
3:
4:
DS70118J-page 175
dsPIC30F2010
FIGURE 22-20:
SCL
IM31
IM34
IM30
IM33
SDA
Stop
Condition
Start
Condition
Note: Refer to Figure 22-2 for load conditions.
FIGURE 22-21:
IM21
IM11
IM10
SCL
IM11
IM26
IM10
IM25
IM33
SDA
In
IM40
IM40
IM45
SDA
Out
DS70118J-page 176
dsPIC30F2010
TABLE 22-36: I2C BUS DATA TIMING REQUIREMENTS (MASTER MODE)
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
Symbol
No.
IM10
Min(1)
Max
Units
Conditions
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
mode(2)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
1 MHz mode(2)
TCY/2 (BRG + 1)
300
ns
20 + 0.1 CB
300
ns
Characteristic
1 MHz
IM11
THI:SCL
IM20
TF:SCL
IM21
TR:SCL
IM25
1 MHz mode(2)
100
ns
1000
ns
20 + 0.1 CB
300
ns
1 MHz mode(2)
300
ns
250
ns
100
ns
mode(2)
ns
ns
0.9
mode(2)
ns
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
1 MHz
IM26
1 MHz
IM30
TSU:STA
IM31
Start Condition
Setup Time
IM33
Output Valid
From Clock
IM50
CB
Note 1:
2:
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
1 MHz mode(2)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
mode(2)
TCY/2 (BRG + 1)
TCY/2 (BRG + 1)
ns
TCY/2 (BRG + 1)
ns
mode(2)
TCY/2 (BRG + 1)
ns
3500
ns
1000
ns
mode(2)
ns
4.7
1.3
1 MHz mode(2)
400
pF
1 MHz
IM45
1 MHz
IM40
CB is specified to be
from 10 to 400 pF
1 MHz mode(2)
1 MHz
IM34
CB is specified to be
from 10 to 400 pF
BRG is the value of the I2C Baud Rate Generator. Refer to Section 21. Inter-Integrated Circuit
(I2C) (DS70068) in the dsPIC30F Family Reference Manual (DS70046).
Maximum pin capacitance = 10 pF for all I2C pins (for 1 MHz mode only).
DS70118J-page 177
dsPIC30F2010
FIGURE 22-22:
SCL
IS34
IS31
IS30
IS33
SDA
Stop
Condition
Start
Condition
FIGURE 22-23:
IS21
IS11
IS10
SCL
IS30
IS26
IS31
IS25
IS33
SDA
In
IS40
IS40
IS45
SDA
Out
DS70118J-page 178
dsPIC30F2010
TABLE 22-37: I2C BUS DATA TIMING REQUIREMENTS (SLAVE MODE)
Standard Operating Conditions: 2.5V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
IS10
IS11
IS20
IS21
IS25
IS26
IS30
IS31
IS33
IS34
IS40
IS45
IS50
Note
Symbol
TLO:SCL
THI:SCL
Characteristic
Clock Low Time
Min
Max
Units
4.7
1.3
1 MHz mode(1)
100 kHz mode
0.5
4.0
s
s
0.6
0.5
s
1 MHz mode(1)
SDA and SCL
100 kHz mode
300
ns
TF:SCL
Fall Time
300
ns
400 kHz mode
20 + 0.1 CB
1 MHz mode(1)
100
ns
TR:SCL
SDA and SCL
100 kHz mode
1000
ns
Rise Time
300
ns
400 kHz mode
20 + 0.1 CB
1 MHz mode(1)
300
ns
100 kHz mode
250
ns
TSU:DAT Data Input
Setup Time
400 kHz mode
100
ns
(1)
100
ns
1 MHz mode
100 kHz mode
0
ns
THD:DAT Data Input
Hold Time
400 kHz mode
0
0.9
s
0
0.3
s
1 MHz mode(1)
TSU:STA Start Condition
100 kHz mode
4.7
s
Setup Time
400 kHz mode
0.6
s
0.25
s
1 MHz mode(1)
100 kHz mode
4.0
s
THD:STA Start Condition
Hold Time
400 kHz mode
0.6
s
(1)
0.25
s
1 MHz mode
100 kHz mode
4.7
s
TSU:STO Stop Condition
Setup Time
400 kHz mode
0.6
s
0.6
s
1 MHz mode(1)
THD:STO Stop Condition
100 kHz mode
4000
ns
Hold Time
400 kHz mode
600
ns
(1)
250
ns
1 MHz mode
0
3500
ns
TAA:SCL Output Valid From 100 kHz mode
Clock
400 kHz mode
0
1000
ns
0
350
ns
1 MHz mode(1)
100 kHz mode
4.7
s
TBF:SDA Bus Free Time
400 kHz mode
1.3
s
0.5
s
1 MHz mode(1)
Bus Capacitive
400
pF
CB
Loading
1: Maximum pin capacitance = 10 pF for all I2C pins (for 1 MHz mode only).
Conditions
Device must operate at a
minimum of 1.5 MHz
Device must operate at a
minimum of 10 MHz.
CB is specified to be from
10 to 400 pF
CB is specified to be from
10 to 400 pF
DS70118J-page 179
dsPIC30F2010
TABLE 22-38: 10-BIT HIGH-SPEED A/D MODULE SPECIFICATIONS
Standard Operating Conditions: 2.7V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
Symbol
Characteristic
Min.
Typ
Max.
Units
Conditions
Device Supply
AD01
AVDD
AD02
AVSS
Greater of
VDD - 0.3
or 2.7
Lesser of
VDD + 0.3
or 5.5
Vss - 0.3
VSS + 0.3
Reference Inputs
AD05
VREFH
AVss+2.7
AVDD
AD06
VREFL
AVss
AVDD - 2.7
AD07
VREF
AVss - 0.3
AVDD + 0.3
AD08
IREF
Current Drain
200
.001
300
3
A
A
A/D operating
A/D off
AD10
AD11
VIN
AD12
AD13
Analog Input
VREFL
VREFH
AVSS - 0.3
AVDD + 0.3
Leakage Current
0.001
0.244
Leakage Current
0.001
0.244
AD17
RIN
Recommended Impedance
Of Analog Voltage Source
5k
AD20
Nr
Resolution
bits
DC Accuracy
10 data bits
Nonlinearity(3)
AD21A INL
Integral Nonlinearity(3)
AD22
DNL
Differential Nonlinearity(3)
AD22A DNL
Differential Nonlinearity(3)
AD23
GERR
Gain Error(3)
+1
AD23A GERR
Gain Error(3)
+1
AD21
INL
Note 1:
2:
3:
Integral
Because the sample caps will eventually lose charge, clock rates below 10 kHz can affect linearity
performance, especially at elevated temperatures.
The A/D conversion result never decreases with an increase in the input voltage, and has no missing
codes.
Measurements were taken with external VREF+ and VREF- used as the ADC voltage references.
DS70118J-page 180
dsPIC30F2010
TABLE 22-38: 10-BIT HIGH-SPEED A/D MODULE SPECIFICATIONS (CONTINUED)
Standard Operating Conditions: 2.7V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
No.
AD24
Symbol
Characteristic
Min.
Typ
Max.
Units
Conditions
EOFF
Offset Error
AD24A EOFF
Offset Error
AD25
Monotonicity(2)
AD30
THD
-64
-67
dB
AD31
SINAD
57
58
dB
AD32
SFDR
67
71
dB
AD33
FNYQ
500
kHz
AD34
ENOB
9.29
9.41
bits
Guaranteed
Dynamic Performance
Note 1:
2:
3:
Because the sample caps will eventually lose charge, clock rates below 10 kHz can affect linearity
performance, especially at elevated temperatures.
The A/D conversion result never decreases with an increase in the input voltage, and has no missing
codes.
Measurements were taken with external VREF+ and VREF- used as the ADC voltage references.
DS70118J-page 181
dsPIC30F2010
FIGURE 22-24:
ADCLK
Instruction
Execution SET SAMP
CLEAR SAMP
SAMP
ch0_dischrg
ch0_samp
ch1_dischrg
ch1_samp
eoc
AD61
AD60
AD55
TSAMP
AD55
DONE
ADIF
ADRES(0)
ADRES(1)
DS70118J-page 182
dsPIC30F2010
FIGURE 22-25:
ADCLK
Instruction
Execution SET ADON
SAMP
ch0_dischrg
ch0_samp
ch1_dischrg
ch1_samp
eoc
TSAMP
TSAMP
AD55
TCONV
AD55
DONE
ADIF
ADRES(0)
ADRES(1)
5 Convert bit 0.
3 Convert bit 9.
4 Convert bit 8.
DS70118J-page 183
dsPIC30F2010
TABLE 22-39: 10-BIT HIGH-SPEED A/D CONVERSION TIMING REQUIREMENTS
Standard Operating Conditions: 2.7V to 5.5V
(unless otherwise stated)
Operating temperature -40C TA +85C for Industrial
-40C TA +125C for Extended
AC CHARACTERISTICS
Param
Symbol
No.
Characteristic
Min.
Typ
Max.
Units
Conditions
Clock Parameters
AD50
TAD
AD51
tRC
84
ns
700
900
1100
ns
Conversion Rate
AD55
tCONV
Conversion Time
12 TAD
AD56
FCNV
Throughput Rate
1.0
Msps
AD57
TSAMP
Sample Time
1 TAD
Timing Parameters
AD60
tPCS
AD61
tPSS
AD62
AD63
Note 1:
2:
1.0 TAD
ns
0.5 TAD
1.5 TAD
ns
tCSS
Conversion Completion to
Sample Start (ASAM = 1)
0.5 TAD
ns
tDPU(2)
20
Because the sample caps will eventually lose charge, clock rates below 10 kHz can affect linearity
performance, especially at elevated temperatures.
tDPU is the time required for the ADC module to stabilize when it is turned on (ADCON1<ADON> = 1).
During this time the ADC result is indeterminate.
DS70118J-page 184
dsPIC30F2010
23.0
PACKAGING INFORMATION
23.1
Example
XXXXXXXX
XXXXXXXX
YYWWNNN
dsPIC30F2010
-30I/MM e3
060700U
Example
dsPIC30F2010-30I/SP
0648017 e3
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
YYWWNNN
Example
Legend: XX...X
Y
YY
WW
NNN
e3
Note:
dsPIC30F2010-30I/SO
0648017 e3
Customer-specific information
Year code (last digit of calendar year)
Year code (last 2 digits of calendar year)
Week code (week of January 1 is week 01)
Alphanumeric traceability code
Pb-free JEDEC designator for Matte Tin (Sn)
This package is Pb-free. The Pb-free JEDEC designator ( e3 )
can be found on the outer packaging for this package.
In the event the full Microchip part number cannot be marked on one line, it will
be carried over to the next line, thus limiting the number of available
characters for customer-specific information.
DS70118J-page 185
dsPIC30F2010
/HDG3ODVWLF4XDG)ODW1R/HDG3DFNDJH00[[PP%RG\>4)16@
ZLWKPP&RQWDFW/HQJWK
1RWH
)RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
D
D2
EXPOSED
PAD
e
E2
E
b
2
K
N
L
NOTE 1
TOP VIEW
BOTTOM VIEW
A3
A1
8QLWV
'LPHQVLRQ/LPLWV
1XPEHURI3LQV
0,//,0(7(56
0,1
120
0$;
3LWFK
2YHUDOO+HLJKW
6WDQGRII
$
&RQWDFW7KLFNQHVV
$
2YHUDOO:LGWK
([SRVHG3DG:LGWK
(
2YHUDOO/HQJWK
'
([SRVHG3DG/HQJWK
%6&
5()
%6&
%6&
'
&RQWDFW:LGWK
&RQWDFW/HQJWK
&RQWDFWWR([SRVHG3DG
.
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
3DFNDJHLVVDZVLQJXODWHG
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
DS70118J-page 186
dsPIC30F2010
/HDG3ODVWLF4XDG)ODW1R/HDG3DFNDJH00[[PP%RG\>4)16@
ZLWKPP&RQWDFW/HQJWK
1RWH
)RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
DS70118J-page 187
dsPIC30F2010
/HDG6NLQQ\3ODVWLF'XDO,Q/LQH63PLO%RG\>63',3@
1RWH
)RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
N
NOTE 1
E1
2 3
D
E
A2
b1
A1
eB
8QLWV
'LPHQVLRQ/LPLWV
1XPEHURI3LQV
,1&+(6
0,1
120
0$;
3LWFK
7RSWR6HDWLQJ3ODQH
0ROGHG3DFNDJH7KLFNQHVV
$
%DVHWR6HDWLQJ3ODQH
$
6KRXOGHUWR6KRXOGHU:LGWK
0ROGHG3DFNDJH:LGWK
(
2YHUDOO/HQJWK
'
7LSWR6HDWLQJ3ODQH
/HDG7KLFNQHVV
E
H%
8SSHU/HDG:LGWK
/RZHU/HDG:LGWK
2YHUDOO5RZ6SDFLQJ
%6&
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
6LJQLILFDQW&KDUDFWHULVWLF
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
0LFURFKLS 7HFKQRORJ\ 'UDZLQJ &%
DS70118J-page 188
dsPIC30F2010
/HDG3ODVWLF6PDOO2XWOLQH62:LGHPP%RG\>62,&@
1RWH
)RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
D
N
E
E1
NOTE 1
1 2 3
e
b
h
A2
h
c
L
A1
8QLWV
'LPHQVLRQ/LPLWV
1XPEHURI3LQV
L1
0,//,0(7(56
0,1
120
0$;
3LWFK
2YHUDOO+HLJKW
%6&
0ROGHG3DFNDJH7KLFNQHVV
$
6WDQGRII
$
2YHUDOO:LGWK
0ROGHG3DFNDJH:LGWK
(
%6&
2YHUDOO/HQJWK
'
%6&
%6&
&KDPIHURSWLRQDO
)RRW/HQJWK
)RRWSULQW
/
5()
)RRW$QJOH7RS
/HDG7KLFNQHVV
/HDG:LGWK
0ROG'UDIW$QJOH7RS
0ROG'UDIW$QJOH%RWWRP
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
6LJQLILFDQW&KDUDFWHULVWLF
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGPPSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
0LFURFKLS 7HFKQRORJ\ 'UDZLQJ &%
DS70118J-page 189
dsPIC30F2010
Note:
For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
DS70118J-page 190
dsPIC30F2010
APPENDIX A:
REVISION HISTORY
DS70118J-page 191
dsPIC30F2010
Revision J (February 2011)
This revision includes minor typographical and
formatting changes throughout the data sheet text.
The major changes are referenced by their respective
section in Table A-1.
TABLE A-1:
Section Name
Update Description
High-Performance, 16-bit
Digital Signal Controller
Updated the Pinout I/O Descriptions for AVDD and AVSS (see Table 1-1).
Added the IUE bit (PWMCON2<2>) to the PWM Register Map (see Table 14-1).
Updated the PWM Period equations (see Equation 14-1 and Equation 14-2).
Updated the maximum value for parameter DC60g in the Power-Down Current
(Ipd) specifications (see Table 22-7).
Updated the maximum value for parameter DI19 and the minimum value for
parameter DI29 in the I/O Pin Input Specifications (see Table 22-8).
Removed parameter D136 and updated the minimum, typical, maximum, and
conditions for parameters D122 and D134 in the Program and EEPROM
specifications (see Table 22-11).
DS70118J-page 192
dsPIC30F2010
INDEX
Numerics
10-bit High Speed A/D
A/D Acquisition Requirements .................................. 117
Aborting a Conversion .............................................. 113
ADCHS ..................................................................... 111
ADCON1 ................................................................... 111
ADCON2 ................................................................... 111
ADCON3 ................................................................... 111
ADCSSL.................................................................... 111
ADPCFG ................................................................... 111
Configuring Analog Port Pins.................................... 119
Connection Considerations....................................... 119
Conversion Operation ............................................... 112
Effects of a Reset...................................................... 118
Operation During CPU Idle Mode ............................. 118
Operation During CPU Sleep Mode.......................... 118
Output Formats ......................................................... 118
Power-Down Modes.................................................. 118
Programming the Start of Conversion Trigger .......... 113
Register Map............................................................. 120
Result Buffer ............................................................. 112
Sampling Requirements............................................ 117
Selecting the Conversion Sequence......................... 112
10-bit High Speed Analog-to-Digital Converter. See A/D
16-bit Up/Down Position Counter Mode.............................. 76
Count Direction Status ................................................ 76
Error Checking ............................................................ 76
A
A/D .................................................................................... 111
1 Msps Configuration Guideline................................ 116
600 ksps Configuration Guideline ............................. 116
750 ksps Configuration Guideline ............................. 116
Conversion Rate Parameters.................................... 115
Conversion Speeds................................................... 114
Selecting the Conversion Clock ................................ 113
Voltage Reference Schematic .................................. 114
AC Characteristics ............................................................ 156
Load Conditions ........................................................ 156
AC Temperature and Voltage Specifications .................... 156
Address Generator Units .................................................... 31
Alternate 16-bit Timer/Counter............................................ 77
Alternate Vector Table ........................................................ 41
Assembler
MPASM Assembler................................................... 144
Automatic Clock Stretch...................................................... 98
During 10-bit Addressing (STREN = 1)....................... 98
During 7-bit Addressing (STREN = 1)......................... 98
Receive Mode ............................................................. 98
Transmit Mode ............................................................ 98
B
Band Gap Start-up Time
Requirements............................................................ 162
Timing Characteristics .............................................. 162
Barrel Shifter ....................................................................... 18
Bit-Reversed Addressing .................................................... 35
Example ...................................................................... 35
Implementation ........................................................... 35
Modifier Values (Table)............................................... 36
Sequence Table (16-Entry)......................................... 36
Block Diagram
PWM ........................................................................... 82
Block Diagrams
10-bit High Speed ADC Functional........................... 111
16-bit Timer1 Module.................................................. 58
DSP Engine ................................................................ 15
dsPIC30F2010.............................................................. 8
External Power-on Reset Circuit .............................. 129
I2C .............................................................................. 96
Input Capture Mode.................................................... 67
Oscillator System...................................................... 123
Output Compare Mode ............................................... 71
Quadrature Encoder Interface .................................... 75
Reset System ........................................................... 127
Shared Port Structure................................................. 53
SPI.............................................................................. 92
SPI Master/Slave Connection..................................... 92
UART Receiver......................................................... 104
UART Transmitter..................................................... 103
BOR Characteristics ......................................................... 155
BOR. See Brown-out Reset
Brown-out Reset
Characteristics.......................................................... 154
Timing Requirements ............................................... 161
Brown-out Reset (BOR).................................................... 121
C
C Compilers
MPLAB C18.............................................................. 144
Center-Aligned PWM .......................................................... 85
CLKO and I/O Timing
Characteristics.......................................................... 160
Requirements ........................................................... 160
Code Examples
Data EEPROM Block Erase ....................................... 50
Data EEPROM Block Write ........................................ 52
Data EEPROM Read.................................................. 49
Data EEPROM Word Erase ....................................... 50
Data EEPROM Word Write ........................................ 51
Erasing a Row of Program Memory ........................... 45
Initiating a Programming Sequence ........................... 46
Loading Write Latches................................................ 46
Code Protection ................................................................ 121
Complementary PWM Operation........................................ 86
Configuring Analog Port Pins.............................................. 54
Control Registers ................................................................ 44
NVMADR .................................................................... 44
NVMADRU ................................................................. 44
NVMCON.................................................................... 44
NVMKEY .................................................................... 44
Core Architecture
Overview..................................................................... 11
Core Register Map.............................................................. 28
Customer Change Notification Service............................. 199
Customer Notification Service .......................................... 199
Customer Support............................................................. 199
D
Data Access from Program Memory
Using Program Space Visibility .................................. 22
Data Accumulators and Adder................................ 16, 17, 18
Data Address Space........................................................... 23
Access RAM ............................................................... 27
Alignment.................................................................... 26
Alignment (Figure) ...................................................... 26
MCU and DSP (MAC Class) Instructions ................... 25
Memory Map......................................................... 23, 24
Spaces........................................................................ 26
DS70118J-page 193
dsPIC30F2010
Width ........................................................................... 26
Data EEPROM Memory ...................................................... 49
Erasing ........................................................................ 50
Erasing, Block ............................................................. 50
Erasing, Word ............................................................. 50
Protection Against Spurious Write .............................. 52
Reading....................................................................... 49
Write Verify ................................................................. 52
Writing ......................................................................... 51
Writing, Block .............................................................. 52
Writing, Word .............................................................. 51
DC Characteristics ............................................................ 148
BOR .......................................................................... 155
Brown-out Reset ....................................................... 154
I/O Pin Input Specifications ....................................... 153
I/O Pin Output Specifications .................................... 154
Idle Current (IIDLE) .................................................... 151
Operating Current (IDD)............................................. 150
Power-Down Current (IPD) ........................................ 152
Program and EEPROM............................................. 155
Temperature and Voltage Specifications .................. 148
Dead-Time Generators ....................................................... 86
Ranges........................................................................ 86
Development Support ....................................................... 143
Device Configuration
Register Map............................................................. 133
Device Configuration Registers......................................... 132
FBORPOR ................................................................ 132
FGS........................................................................... 132
FOSC ........................................................................ 132
FWDT........................................................................ 132
Device Overview ................................................................... 7
Divide Support..................................................................... 14
DSP Engine......................................................................... 14
Multiplier...................................................................... 16
Dual Output Compare Match Mode .................................... 72
Continuous Pulse Mode .............................................. 72
Single Pulse Mode ...................................................... 72
E
Edge-Aligned PWM............................................................. 85
Electrical Characteristics................................................... 147
AC ............................................................................. 156
DC ............................................................................. 148
Equations
A/D Conversion Clock ............................................... 113
Baud Rate ................................................................. 107
PWM Period ................................................................ 84
PWM Period (Up/Down Count Mode) ......................... 84
PWM Resolution ......................................................... 84
Serial Clock Rate ........................................................ 99
Errata .................................................................................... 6
Exception Sequence
Trap Sources .............................................................. 39
External Clock Timing Characteristics
Type A and B Timer .................................................. 163
External Clock Timing Requirements................................ 157
Type A Timer ............................................................ 163
Type B Timer ............................................................ 164
Type C Timer ............................................................ 164
External Interrupt Requests ................................................ 41
F
Fast Context Saving............................................................ 41
Firmware Instructions........................................................ 135
Flash Program Memory....................................................... 43
DS70118J-page 194
I
I/O Pin Specifications
Input.......................................................................... 153
Output ....................................................................... 154
I/O Ports.............................................................................. 53
Parallel I/O (PIO) ........................................................ 53
I2C....................................................................................... 95
I2C 10-bit Slave Mode Operation........................................ 97
Reception ................................................................... 98
Transmission .............................................................. 97
I2C 7-bit Slave Mode Operation.......................................... 97
Reception ................................................................... 97
Transmission .............................................................. 97
I2C Master Mode
Baud Rate Generator ................................................. 99
Clock Arbitration ....................................................... 100
Multi-Master Communication, Bus Collision
and Bus Arbitration ........................................... 100
Reception ................................................................... 99
Transmission .............................................................. 99
I2C Module
Addresses................................................................... 97
Bus Data Timing Characteristics
Master Mode..................................................... 176
Slave Mode....................................................... 178
Bus Data Timing Requirements
Master Mode..................................................... 177
Slave Mode....................................................... 179
Bus Start/Stop Bits Timing Characteristics
Master Mode..................................................... 176
Slave Mode....................................................... 178
General Call Address Support .................................... 99
Interrupts .................................................................... 98
IPMI Support............................................................... 99
Master Operation ........................................................ 99
Master Support ........................................................... 99
Operating Function Description .................................. 95
Operation During CPU Sleep and Idle Modes .......... 100
Pin Configuration ........................................................ 95
Programmers Model .................................................. 95
Register Map ............................................................ 101
Registers .................................................................... 95
Slope Control .............................................................. 99
Software Controlled Clock Stretching (STREN = 1) ... 98
Various Modes............................................................ 95
Idle Current (IIDLE) ............................................................ 151
In-Circuit Serial Programming (ICSP)............................... 121
Independent PWM Output .................................................. 87
Initialization Condition for RCON Register Case 1 ........... 130
Initialization Condition for RCON Register Case 2 ........... 130
Initialization Condition for RCON Register, Case 1 .......... 130
Input Capture (CAPx) Timing Characteristics................... 166
Input Capture Interrupts...................................................... 69
Register Map .............................................................. 70
Input Capture Module ......................................................... 67
In CPU Sleep Mode .................................................... 69
Simple Capture Event Mode....................................... 68
Input Capture Timing Requirements................................. 166
Input Change Notification Module....................................... 54
Register Map (bits 15-0) ............................................. 55
Input Characteristics
QEA/QEB ................................................................. 169
dsPIC30F2010
Instruction Addressing Modes............................................. 31
File Register Instructions ............................................ 31
Fundamental Modes Supported.................................. 31
MAC Instructions......................................................... 32
MCU Instructions ........................................................ 32
Move and Accumulator Instructions............................ 32
Other Instructions........................................................ 32
Instruction Set ................................................................... 135
Inter-Integrated Circuit. See I2C
Internal Clock Timing Examples ....................................... 159
Internet Address................................................................ 199
Interrupt Controller
Register Map............................................................... 42
Interrupt Priority .................................................................. 38
Traps........................................................................... 39
Interrupt Sequence ............................................................. 41
Interrupt Stack Frame ................................................. 41
Interrupts ............................................................................. 37
L
Load Conditions ................................................................ 156
M
Memory Organization.......................................................... 19
Microchip Internet Web Site .............................................. 199
Modulo Addressing ............................................................. 33
Applicability ................................................................. 35
Operation Example ..................................................... 34
Start and End Address................................................ 33
W Address Register Selection .................................... 33
Motor Control PWM Module................................................ 81
Fault Timing Characteristics ..................................... 168
Timing Characteristics .............................................. 168
Timing Requirements................................................ 168
MPLAB ASM30 Assembler, Linker, Librarian ................... 144
MPLAB Integrated Development Environment Software .. 143
MPLAB PM3 Device Programmer .................................... 146
MPLAB REAL ICE In-Circuit Emulator System................. 145
MPLINK Object Linker/MPLIB Object Librarian ................ 144
O
OC/PWM Module Timing Characteristics.......................... 167
Operating Current (IDD)..................................................... 150
Operating MIPS vs Voltage
dsPIC30F2010 .......................................................... 148
Oscillator
Configurations
Fast RC (FRC) .................................................. 125
Low Power RC (LPRC) ..................................... 125
Phase Locked Loop (PLL) ................................ 125
Oscillator Configurations ................................................... 124
Fail-Safe Clock Monitor............................................. 126
Initial Clock Source Selection ................................... 124
LP Oscillator Control ................................................. 125
Start-up Timer (OST) ................................................ 124
Oscillator Operating Modes Table .................................... 122
Oscillator Selection ........................................................... 121
Oscillator Start-up Timer
Timing Characteristics .............................................. 161
Timing Requirements................................................ 161
Output Compare Interrupts ................................................. 73
Output Compare Mode
Register Map............................................................... 74
Output Compare Module..................................................... 71
Timing Characteristics .............................................. 166
Timing Requirements................................................ 166
P
Packaging Information ...................................................... 185
Marking..................................................................... 185
Pinout Descriptions............................................................... 9
PLL Clock Timing Specifications ...................................... 158
POR. See Power-on Reset
Port Register Map............................................................... 55
Port Write/Read Example ................................................... 54
PORTB
Register Map .............................................................. 55
PORTC
Register Map .............................................................. 55
PORTD
Register Map .............................................................. 55
PORTE
Register Map .............................................................. 55
PORTF
Register Map .............................................................. 55
Position Measurement Mode .............................................. 77
Power-Down Current (IPD)................................................ 152
Power-on Reset (POR)..................................................... 121
Oscillator Start-up Timer (OST)................................ 121
Power-up Timer (PWRT) .......................................... 121
Power-Saving Modes........................................................ 131
Idle............................................................................ 132
Sleep ........................................................................ 131
Power-Saving Modes (Sleep and Idle) ............................. 121
Power-up Timer
Timing Characteristics .............................................. 161
Timing Requirements ............................................... 161
Product Identification System ........................................... 201
Program Address Space..................................................... 19
Construction ............................................................... 20
Data Access from Program Memory Using
Table Instructions ............................................... 21
Data Access From, Address Generation .................... 20
Memory Map............................................................... 19
Table Instructions
TBLRDH ............................................................. 21
TBLRDL.............................................................. 21
TBLWTH............................................................. 21
TBLWTL ............................................................. 21
Program and EEPROM Characteristics............................ 155
Program Counter ................................................................ 12
Program Data Table Access............................................... 22
Program Space Visibility
Window into Program Space Operation ..................... 23
Programmable .................................................................. 121
Programmable Digital Noise Filters .................................... 77
Programmers Model .......................................................... 12
Diagram ...................................................................... 13
Programming Operations.................................................... 45
Algorithm for Program Flash....................................... 45
Erasing a Row of Program Memory ........................... 45
Initiating the Programming Sequence ........................ 46
Loading Write Latches................................................ 46
Programming, Device Instructions.................................... 135
Protection Against Accidental Writes to OSCCON ........... 126
PWM
Register Map .............................................................. 90
PWM Duty Cycle Comparison Units ................................... 85
Duty Cycle Register Buffers ....................................... 86
PWM FLTA Pins ................................................................. 88
DS70118J-page 195
dsPIC30F2010
Enable Bits .................................................................. 88
Fault States ................................................................. 88
Modes ......................................................................... 88
Cycle-by-Cycle.................................................... 88
Latched ............................................................... 88
PWM Operation During CPU Idle Mode.............................. 89
PWM Operation During CPU Sleep Mode .......................... 89
PWM Output and Polarity Control ....................................... 88
Output Pin Control ...................................................... 88
PWM Output Override......................................................... 87
Complementary Output Mode ..................................... 87
Synchronization .......................................................... 87
PWM Period ........................................................................ 84
PWM Special Event Trigger ................................................ 89
Postscaler ................................................................... 89
PWM Time Base ................................................................. 83
Continuous Up/Down Counting Modes ....................... 83
Double Update Mode .................................................. 84
Free Running Mode .................................................... 83
Postscaler ................................................................... 84
Prescaler ..................................................................... 84
Single-Shot Mode ....................................................... 83
PWM Update Lockout ......................................................... 88
Q
QEA/QEB Input Characteristics ........................................ 169
QEI Module
External Clock Timing Requirements........................ 165
Index Pulse Timing Characteristics........................... 170
Index Pulse Timing Requirements ............................ 170
Operation During CPU Idle Mode ............................... 78
Operation During CPU Sleep Mode ............................ 77
Register Map............................................................... 79
Timer Operation During CPU Idle Mode ..................... 78
Timer Operation During CPU Sleep Mode.................. 77
Quadrature Decoder Timing Requirements ...................... 169
Quadrature Encoder Interface (QEI) Module ...................... 75
Quadrature Encoder Interface Interrupts ............................ 78
Quadrature Encoder Interface Logic ................................... 76
R
Reader Response ............................................................. 200
Reset......................................................................... 121, 127
Reset Sequence.................................................................. 39
Reset Sources ............................................................ 39
Reset Timing Characteristics ............................................ 161
Reset Timing Requirements.............................................. 161
Resets
BOR, Programmable................................................. 129
POR .......................................................................... 127
Operating without FSCM and PWRT ................ 129
POR with Long Crystal Start-up Time ....................... 129
RTSP Operation.................................................................. 44
S
Serial Peripheral Interface. See SPI
Simple Capture Event Mode
Capture Buffer Operation............................................ 68
Capture Prescaler ....................................................... 68
Hall Sensor Mode ....................................................... 68
Input Capture in CPU Idle Mode ................................. 69
Timer2 and Timer3 Selection Mode ............................ 68
Simple OC/PWM Mode Timing Requirements.................. 167
Simple Output Compare Match Mode................................. 72
DS70118J-page 196
T
Temperature and Voltage Specifications
AC............................................................................. 156
DC ............................................................................ 148
Timer1 Module.................................................................... 57
16-bit Asynchronous Counter Mode ........................... 57
16-bit Synchronous Counter Mode ............................. 57
16-bit Timer Mode....................................................... 57
Gate Operation ........................................................... 58
Interrupt ...................................................................... 59
Operation During Sleep Mode .................................... 58
Prescaler .................................................................... 58
Real-Time Clock ......................................................... 59
RTC Interrupts .................................................... 59
RTC Oscillator Operation ................................... 59
Register Map .............................................................. 60
Timer2 and Timer3 Selection Mode.................................... 72
Timer2/3 Module................................................................. 61
32-bit Synchronous Counter Mode ............................. 61
32-bit Timer Mode....................................................... 61
ADC Event Trigger...................................................... 64
Gate Operation ........................................................... 64
Interrupt ...................................................................... 64
Operation During Sleep Mode .................................... 64
Register Map .............................................................. 65
Timer Prescaler .......................................................... 64
dsPIC30F2010
TimerQ (QEI Module) External Clock
Timing Characteristics .............................................. 165
Timing Characteristics
A/D Conversion
10-Bit High-speed (CHPS = 01, SIMSAM = 0,
ASAM = 0, SSRC = 000) .......................... 182
10-bit High-speed (CHPS = 01, SIMSAM = 0,
ASAM = 1, SSRC = 111, SAMC = 00001) 183
Band Gap Start-up Time ........................................... 162
CLKO and I/O ........................................................... 160
External Clock........................................................... 156
I2C Bus Data
Master Mode ..................................................... 176
Slave Mode ....................................................... 178
I2C Bus Start/Stop Bits
Master Mode ..................................................... 176
Slave Mode ....................................................... 178
Input Capture (CAPx)................................................ 166
Motor Control PWM Module...................................... 168
Motor Control PWM Module Fault............................. 168
OC/PWM Module ...................................................... 167
Oscillator Start-up Timer ........................................... 161
Output Compare Module........................................... 166
Power-up Timer ........................................................ 161
QEI Module Index Pulse ........................................... 170
Reset......................................................................... 161
SPI Module
Master Mode (CKE = 0) .................................... 171
Master Mode (CKE = 1) .................................... 172
Slave Mode (CKE = 0) ...................................... 173
Slave Mode (CKE = 1) ...................................... 174
TimerQ (QEI Module) External Clock ....................... 165
Type A and B Timer External Clock.......................... 163
Watchdog Timer........................................................ 161
Timing Diagrams
Center-Aligned PWM .................................................. 85
Dead-Time .................................................................. 87
Edge-Aligned PWM..................................................... 85
PWM Output ............................................................... 73
Time-out Sequence on Power-up
(MCLR Not Tied to VDD), Case 1...................... 128
Time-out Sequence on Power-up
(MCLR Not Tied to VDD), Case 2...................... 128
Time-out Sequence on Power-up
(MCLR Tied to VDD).......................................... 128
Timing Diagrams and Specifications
DC Characteristics - Internal RC Accuracy............... 159
Timing Diagrams.See Timing Characteristics
Timing Requirements
A/D Conversion
High-speed ....................................................... 184
Band Gap Start-up Time ........................................... 162
Brown-out Reset ....................................................... 161
CLKO and I/O ........................................................... 160
External Clock........................................................... 157
I2C Bus Data (Master Mode)..................................... 177
I2C Bus Data (Slave Mode)....................................... 179
Input Capture ............................................................ 166
Motor Control PWM Module...................................... 168
Oscillator Start-up Timer ........................................... 161
Output Compare Module........................................... 166
Power-up Timer ........................................................ 161
QEI Module
External Clock................................................... 165
Index Pulse ....................................................... 170
U
UART
Address Detect Mode ............................................... 107
Auto Baud Support ................................................... 107
Baud Rate Generator ............................................... 107
Enabling and Setting Up UART ................................ 105
Alternate I/O ..................................................... 105
Disabling........................................................... 105
Enabling ........................................................... 105
Setting Up Data, Parity and
Stop Bit Selections ................................... 105
Loopback Mode ........................................................ 107
Module Overview...................................................... 103
Operation During CPU Sleep and Idle Modes.......... 108
Receiving Data ......................................................... 106
In 8-bit or 9-bit Data Mode................................ 106
Interrupt ............................................................ 106
Receive Buffer (UxRXB)................................... 106
Reception Error Handling ......................................... 106
Framing Error (FERR) ...................................... 107
Idle Status ........................................................ 107
Parity Error (PERR) .......................................... 107
Receive Break .................................................. 107
Receive Buffer Overrun Error (OERR Bit) ........ 106
Transmitting Data ..................................................... 105
In 8-bit Data Mode ............................................ 105
In 9-bit Data Mode ............................................ 105
Interrupt ............................................................ 106
Transmit Buffer (UxTXB) .................................. 105
UART1 Register Map ............................................... 109
Unit ID Locations .............................................................. 121
Universal Asynchronous Receiver Transmitter. See UART.
W
Wake-up from Sleep ......................................................... 121
Wake-up from Sleep and Idle ............................................. 41
Watchdog Timer
Timing Characteristics .............................................. 161
Timing Requirements ............................................... 161
Watchdog Timer (WDT)............................................ 121, 131
Enabling and Disabling............................................. 131
Operation.................................................................. 131
WWW Address ................................................................. 199
WWW, On-Line Support ....................................................... 6
DS70118J-page 197
dsPIC30F2010
NOTES:
DS70118J-page 198
dsPIC30F2010
THE MICROCHIP WEB SITE
CUSTOMER SUPPORT
Distributor or Representative
Local Sales Office
Field Application Engineer (FAE)
Technical Support
Development Systems Information Line
Customers
should
contact
their
distributor,
representative or field application engineer (FAE) for
support. Local sales offices are also available to help
customers. A listing of sales offices and locations is
included in the back of this document.
Technical support is available through the web site
at: http://support.microchip.com
DS70118J-page 199
dsPIC30F2010
READER RESPONSE
It is our intention to provide you with the best documentation possible to ensure successful use of your Microchip
product. If you wish to provide your comments on organization, clarity, subject matter, and ways in which our
documentation can better serve you, please FAX your comments to the Technical Publications Manager at
(480) 792-4150.
Please list the following information, and use this outline to provide us with your comments about this document.
TO:
RE:
Reader Response
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________
Application (optional):
Would you like a reply?
Device: dsPIC30F2010
Questions:
1. What are the best features of this document?
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
DS70118J-page 200
dsPIC30F2010
PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office.
d s P I C 3 0 F 2 0 1 0 AT- 2 0 E / S O - E S
Trademark
Custom ID (3 digits) or
Engineering Sample (ES)
Architecture
Flash
Memory Size in Bytes
0 = ROMless
1 = 1K to 6K
2 = 7K to 12K
3 = 13K to 24K
4 = 25K to 48K
5 = 49K to 96K
6 = 97K to 192K
7 = 193K to 384K
8 = 385K to 768K
9 = 769K and Up
Device ID
Package
MM = QFN-S
SP = SPDIP
SO = SOIC
S = Die (Waffle Pack)
W = Die (Wafers)
Temperature
I = Industrial -40C to +85C
E = Extended High Temp -40C to +125C
Speed
20 = 20 MIPS
30 = 30 MIPS
T = Tape and Reel
A,B,C = Revision Level
Example:
dsPIC30F2010AT-20E/SO = 20 MIPS, Extended temp., SOIC package, Rev. A
DS70118J-page 201
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
India - Bangalore
Tel: 91-80-3090-4444
Fax: 91-80-3090-4123
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Cleveland
Independence, OH
Tel: 216-447-0464
Fax: 216-447-0643
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
China - Chongqing
Tel: 86-23-8980-9588
Fax: 86-23-8980-9500
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
Taiwan - Kaohsiung
Tel: 886-7-213-7830
Fax: 886-7-330-9305
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
08/04/10
DS70118J-page 202