dsPIC30F Digital Signal Controllers - ds70095h
dsPIC30F Digital Signal Controllers - ds70095h
dsPIC30F Digital Signal Controllers - ds70095h
Performance
A Digital Signal Controller (DSC) is a single-chip, embedded controller that
seamlessly integrates the control attributes of a Microcontroller (MCU) with
the computation and throughput capabilities of a Digital Signal Processor (DSP)
in a single core. DSPs
dsPIC30F
Microchip’s dsPIC® DSC offers everything you would expect from a powerful 1st Generation DSC 32-bit
16-bit MCU: fast, sophisticated and flexible interrupt handling; a wide array of MCUs
digital and analog peripheral functions; power management; flexible clocking
options; power-on-reset; brown-out protection; watchdog timer; code security;
full-speed real-time emulation; and full-speed in-circuit debug solutions.
16-bit
By skillfully adding DSP capability to a powerful 16-bit MCU, Microchip’s MCUs
dsPIC30F family of dsPIC DSCs achieves the best of both worlds and marks
the beginning of a new era in embedded control.
Price
If you are one of the many MCU users Considering a 32-bit MCU?
looking to add DSP features to your DSP for the DSP Expert!
system, chances are you don’t like your Considering a 32-bit controller because
choices. Adding a DSP chip to your A seasoned DSP developer will your current MCU has run out of steam?
existing MCU-based system can be be amazed at the capabilities the
costly and complicated. The dsPIC30F dsPIC30F family offers — everything The dsPIC30F with integrated DSP can
is designed to look and feel like an you expect from a DSP of its class: outperform a 32-bit controller in many
MCU. Adding DSP functionality in the dual 40-bit accumulators, single-cycle applications. Our outstanding C code
familiar controller-like environment can 16 x 16 MAC, 40-bit barrel shifter, efficiency for 32-bit data type reduces
be accomplished with ease. dual operand fetches, saturation and memory requirements and cost.
rounding modes and DO and REPEAT
loops. Then we added a few items Future dsPIC30F variants with larger
usually missing from DSPs: flexible program memory are in development to
interrupts, large register sets, a give you a long-term roadmap with the
watchdog timer, clock fail detect and dsPIC DSC architecture.
real-time emulation to name a few.
2
Best of Both Worlds
®
MCU Attributes Single core architecture DSP Attributes
•State-centric Familiar MCU look and feel •Flow-centric
•Interrupt intensive DSP performance •Interrupt averse
•Cost driven Rich peripheral options •Performance driven
•Flash capability Advanced interrupt capability •Emerging Flash
•Robust peripherals Robust Flash memory
•Limited peripherals
•HLL frequently used
Flexible re-programmability
•HLL infrequently used
Robust Data EEPROM
Low pin count options
Optimized for C
The first 16-bit MCUs were developed to Cycle Count Number of Execution Time
overcome the native 64 KB boundary imposed Function Equation Conditions* Cycles @30 MIPS
by 8-bit MCUs. The need for advanced
Complex FFT** — N=64 3739 124.6 μs
performance was not contemplated in
these early architectures. When the need Complex FFT** — N=128 8485 282.8 μs
for improved performance became obvious, Complex FFT** — N=256 19055 635.2 μs
next-generation devices were developed, but Single Tap FIR — —- 1 33 ns
were constrained by backward compatibility
Block FIR 53+N(4+M) N=32, M=32 1205 40.2 μs
requirements and legacy issues.
Block FIR Lattice 41+N(4+7M) N=32, M=32 7337 244.6 μs
Developed from the ground up, the dsPIC DSC Block IIR Canonic 36+N(8+7S) N=32, S=4 1188 39.6 μs
addresses traditional 16-bit requirements Block IIR Lattice 46+N(16+7M) N=32, M=8 2350 78.3 μs
without sacrificing performance. It combines
Matrix Add 20+3(C*R) C=8, R=8 212 7.1 μs
state-of-the-art 16-bit MCU performance in its
general-purpose register-based core with all Matrix Transpose 16+C(6+3(R-1)) C=8, R=8 232 7.7 μs
the features you need for DSP operations. Vector Dot Product 17+3N N=32 113 3.8 μs
Vector Max 19+7(N-2) N=32 229 7.6 μs
Vector Multiply 17+4N N=32 145 4.8 μs
Competitive DSP Performance Vector Power 16+2N N=32 80 2.7 μs
PID Loop Core -— — 7 231 ns
The dsPIC30F balances its outstanding MCU
*C= #columns, N=# samples, M=#taps, S=#sections, R=#rows
qualities with competitive DSP performance. **Complex FFT routine inherently prevents overflow
All the features you require from a high
1 cycle = 33 nanoseconds @ 30 MIPS
performance, robust DSP are effortlessly
integrated in the dsPIC DSC.
3
dsPIC30F Family Block Diagram
Operating Range On-Chip Flash, Data EEPROM and SRAM Communication Modules
DC to 30 MIPS* Flash program memory: up to 144 KB 3-wire SPI™: up to 2 modules
Wide VDD range: 2.5 - 5.5V •100K erase/write cycles typical •Framing supports I/O interface to simple codecs
Ind.(-40° to 85° C) and ext. (-40° to 125°C) Data EEPROM: up to 4 KB I²C™ full multi-master, slave mode support
•1 million erase/write cycles typical •7-bit and 10-bit addressing
*30 MIPS @ 4.5-5.5V, -40° to 85° C
Data SRAM: up to 8K bytes •Bus collision detection and arbitration
High Performance DSC CPU UART: up to 2 modules
System Management •Interrupt-on-address bit detect
Single core combines MCU and DSP features
Flexible clock options: •Wake-up on Start bit from Sleep mode
C compiler optimized instruction set •Primary external clock, crystal, resonator •4-character TX and RX FIFO buffers
16-bit wide data path •Secondary external lower power (32 kHz Codec interface module
24-bit wide instructions crystal oscillator) •Supports I²S and AC97 protocols
•Internal RC: fast or low power
84 base instructions: mostly 1 word/1 cycle •Integrated PLL (4x, 8x, 16x) CAN 2.0B active: up to 2 modules
16 16-bit general purpose registers -- Low jitter PLL •3 transmit and 2 receive buffers
-- PLL sourced by ext. & int. clock sources •Wake-up on CAN message
2 40-bit accumulators
•With rounding and saturation options Programmable power-up timer Motor Control Peripherals
Flexible and powerful addressing modes Oscillator start-up timer/stabilizer Motor Control PWM: up to 8 outputs
•Indirect, modulo and bit-reversed •4 duty cycle generators
Watchdog Timer with its own RC oscillator •Independent or complementary mode
Software stack Clock switching/fail-safe clock monitor •Programmable dead time settings
16 x 16 fractional/integer multiplier •Edge or center-aligned
Interrupt Controller •Manual output override control
32/16 and 16/16 divide
5 cycle fixed latency •Up to 2 fault inputs
Single cycle multiply-and-accumulate •A/D samples triggered by PWM module
Up to 45 interrupt sources, up to 5 external
40-stage barrel shifter Quadrature encoder interface module
7 programmable priority levels
Power Management •Phase A, Phase B and index pulse input
4 processor exceptions and software traps
Switch between clock sources in real-time Enhanced!
Timers/Capture/Compare/PWM
Programmable power-on reset start up 10-bit, 1 Msps A/D converter module
Timer/counters: up to five 16-bit timers •2 or 4 simultaneous samples
Programmable low-voltage detect •Can pair up to make 32-bit timers •Up to 16 input channels with auto scanning
Programmable brown-out reset •1 timer runs as real-time clock with external •16 deep result buffer
32 kHz oscillator •Conversion possible in Sleep mode
Idle and Sleep modes with fast wake-up
Input capture: up to 8 channels
12-bit, 200 ksps A/D converter module
Digital I/O •Capture on rising, falling or both edges
•Up to 16 input channels with auto scanning
•4-deep FIFO on each capture
Up to 54 programmable digital I/O pins •16 deep result buffer
Output compare: up to 8 channels •Conversion possible in Sleep mode
Wake-up/Interrupt-on-change on up to 24 pins •Single or dual 16-bit compare mode
25 mA sink and source on all I/O pins •16-bit glitchless PWM mode ±1 LSB accuracy
4
dsPIC30F Product Families
General Purpose Family
The dsPIC30F General Purpose Family is ideal for a wide variety of 16-bit MCU embedded applications. In addition, the vari-
ants with codec interfaces are well suited for audio applications.
Output
Program EE- Compare/ A/D I/O
Memory SRAM PROM Timer Input Standard Codec 12-bit Pins
Product Pins K Bytes Bytes Bytes 16-bit Capture PWM Interface 200 ksps UART SPI™ I²C™ CAN (max.)* Package Code
Sensor Family
The dsPIC30F Sensor Family products have features designed to support high-performance, low-cost embedded control
applications. The 18- and 28-pin packages are designed to fit space-critical applications.
Output
Program EE- Compare/ A/D I/O
Memory SRAM PROM Timer Input Standard 12-bit Pins
Product Pins K Bytes Bytes Bytes 16-bit Capture PWM 200 ksps UART SPI™ I²C™ (Max.)* Package Code
dsPIC30F Packages
MM: 28-pin QFN ML: 44-pin QFN ML: 28-pin QFN
(6 mm x 6 mm x 0.9 mm) (8 mm x 8 mm x 0.9 mm) (6 mm x 6 mm x 0.9 mm)
SP: 28-pin SPDIP SO: 28-pin SOIC PT: 44-pin TQFP PT: 80-pin TQFP PF: 80-pin TQFP
(34.67 x 7.87 x 3.3 mm) (17.88 x 10.34 x 2.31 mm) (10 mm x 10 mm x 1 mm) (12 mm x 12 mm x 1 mm) (14 mm x 14 mm x 1 mm)
25 mA I/O drive
saves cost
The dsPIC DSC is designed Low Jitter PLL for
Each I/O pin sources or sinks 25 to meet the rigorous demands of reliable system operation
mA, making it possible to drive On-chip PLL with crystal oscillator
LEDs directly or eliminate pre- real-time systems. Not only is its input offers low jitter, < ±0.75% over
drivers for external FET switches VDD and temperature for reliable
to save you space and cost.
real-time performance superior operation of CAN or other forms of
compared to other 16- and 32- communication.
Invest in the dsPIC30F family once and reap the benefits of having a single platform over many applications.
Motor Control
The dsPIC30F is ideal for motors requiring more than a basic microcontroller. Whether you need a little more computation
power or full DSP capability, the dsPIC30F delivers.
Apply the dsPIC30F for sensorless control, precision speed/position/servo control, torque management, variable speed
motors, high RPM motors, variable load applications, noise reduction or energy efficiency improvement. Brushless DC, AC
induction or switch reluctance motors are ideal candidates for the dsPIC30F family of controllers.
Internet Connectivity
If your embedded control system needs to be connected to the Internet or to a dial-up phone line, the dsPIC30F provides you
with a single chip solution. The “ready-to-use” TCP/IP Ethernet driver and soft modem application libraries enable you to add
connectivity to your design.
The 18- and 28-pin small footprint dsPIC30F parts are ideal for advanced sensor control. The combination of a 12-bit A/D
converter, communication peripherals, power management features and DSP capability makes it possible to create intelligent
sensor interface modules. These devices can also assist an overloaded central controller.
Automotive
Microchip is an ISO/TS 16949:2002 qualified supplier to major automotive manufacturers. Most of our products are
available for automotive-grade temperature requirements and support a long product life cycle.
Available in 18- to 80-pin packages, the dsPIC30F family is ideal for a variety of automotive applications from a large
central controller to small sensor interface or peripheral processor.
8
Speech
Often speech and low fidelity audio applications use a DSP for algorithm processing and an MCU for control. The dsPIC30F can
replace both in many applications and reduce total system cost. The dsPIC DSC provides enough MIPS for many speech and
audio applications, such as noise and echo cancellation, speech recognition and quality speech compression and playback.
The dsPIC DSC is also an ideal companion to a main DSP in high-end audio applications; offloading functions such as a
digital tuner, satellite radio, equalizer, etc.
The dsPIC30F is ideal for a variety of power conversion and monitoring applications. UPSs, inverters, as well as power
management units within complex equipment, such as copiers, telecom switches and routers, require advanced power
management. The dsPIC30F has Pulse Width Modulation (PWM) outputs, fast analog-to-digital conversion and plenty of
computation power to satisfy the needs of these applications.
9
Powerful Tools and Libraries to Ease Your Development
The dsPIC30F family comes with an extensive array of development tools, application libraries (many of which are free
of charge), development boards and reference designs that allow high-performance embedded solutions to be designed
effortlessly and rapidly.
• Designed for Windows® XP, 2000 and Windows NT® • Full feature code editor with color context
• Project build and management • Source level debug in ASM and C
• Flexible watch windows • Searchable trace buffers
• Mouse over variable inspection • Version control integration
10
Develop DSP Algorithms: The Easy Way
dsPICworks™ Data Analysis and DSP Software
The dsPICworks Data Analysis and DSP Software makes it easy to evaluate
and analyze DSP algorithms. You can run a variety of DSP and arithmetic
operations and analyze your data in both time and frequency domain. Key
features of the dsPICworks Data Analysis and DSP Software:
11
World Class Software Development Tools
Assembler/Linker/Librarian MPLAB C30 C Compiler
The MPLAB ASM30 is a full-featured The MPLAB C30 C Compiler is a full-featured, ANSI compliant optimizing compiler.
macro assembler. User defined The MPLAB C30 C Compiler includes a complete ANSI C standard library, including
macros, conditional assembly and a string manipulation, dynamic memory allocation, data conversion, timekeeping and
variety of assembler directives make math libraries.
the MPLAB ASM30 a powerful code
generation tool. The MPLAB C30 C Compiler has a powerful code optimizer; other 16-bit MCUs
generate as much as 165 percent larger code for the same application.
The MPLAB LINK30 and MPLAB LIB30
are Linker and Librarian modules that
allow efficient linking, library creation
and maintenance.
12
Plug and Play with Our Connectivity Libraries
TCP/IP Protocol Stack
MicroNet™ TCP/IP Stack by CMX
MicroNet™ TCP/IP Stack by CMX
• RFC compliant protocol stack
Connect to the Internet using proven, professional quality TCP/IP software libraries.
• Supports CMX RTOS
CMX-MicroNet™ is an embedded TCP/IP stack that is specifically designed for optimized
• Ethernet NIC driver
use of Flash and RAM resources on Microchip’s dsPIC30F. The software runs directly on
• Small Flash/RAM footprint
the processor with no gateways or PCs required. The stack can be run in stand alone • Source code provided
mode or work in conjunction with an RTOS. Using only industry standard protocols, CMX-
MicroNet offers true TCP/IP networking via direct, dial-up or Ethernet connectivity and
wireless Ethernet (802.11b) as well.
Microchip Free TCP/IP Stack
Up to 127 sockets can be open at a time. They can be Ethernet sockets and/or PPP or
• Out-of-box support for Microchip
SLIP sockets. PPP and SLIP cannot be used at the same time. An HTTP web server, FTP
C30 compilers
server, SMTP client and DHCP client are also available. The RS-232 link, if used, can
• Utilizes the dsPICDEM Connectivty
either be a direct cable link or through a modem. This library can be readily implemented
Development Board
on the dsPICDEM.net™ Connectivity Board.
• Implements complete TCP state
machine
Microchip Free TCP/IP Stack
• Multiple TCP and UDP sockets
The Microchip TCP/IP Stack is now supported on the dsPIC30F product family. This stack
with simultaneous connection/
is a suite of programs that provide services for standard TCP/IP-based applications
management
(HTTP Server, Mail Client, etc.) or it can be used in a custom TCP/IP-based application.
• Modules provided: MAC, SLIP,
Potential users do not need to know all of the intricacies of the TCP/IP specifications to
ARP, IP, ICMP, TCP, SNMP, UDP,
use it, and those interested only in the accompanying HTTP Server application need not
DHCP, FTP, IP Gleaning, HTTP,
have specific knowledge of TCP/IP. This stack is implemented in a modular fashion, with
MPFS (Microchip File System)
all of its services creating highly abstracted layers, each layer accessing services from
• Use it as a part of HTTP Server
one or more layers directly below it. The stack is optimized for size and is designed to
(included) or any custom TCP/IP
run on the dsPIC DSC. While this particular implementation is specifically targeted to run
based application
on the dsPICDEM.net Connectivity Development Board, it can be easily retargeted to any
• RTOS independent
hardware equipped with a dsPIC30F device. HTML web pages generated by the dsPIC
DSC can be viewed with a standard web browser such as Microsoft® Internet Explorer.
13
Libraries for Speech Applications
Noise Suppression Library
This application library suppresses the noise interference in a speech
signal, such as ambient noise picked up by a microphone while
capturing speech. This algorithm is particularly useful for systems
where isolated noise reference is not available—such as hands-free
phones, speakerphones, intercoms and headsets.
Speech Recognition
Speech Recognition Library features:
Automatic Speech Recognition (ASR) for the dsPIC30F
• Speaker independent recognition
family can support a wide range of voice-activated
• PC-based word library builder
applications such as handset and home appliance control.
• Up to 100 word vocabulary (American English)
A Speech Word Library Builder and a Speech Recognition
• Supports multiple noise profiles
Software Library make up the ASR software suite. Key
• Suitable for many voice control applications
features of the ASR application software:
14
More Application Libraries Ready to Use
Encryption Libraries
Symmetric Key Embedded Encryption Library features:
• 128-bit AES in ECB, CTR, CBC, CBC-MAC and CCM modes
Implement reliable secure applications using the
• Triple DES in ECB, CTR, CBC and CBC–MAC modes
Symmetric and Asymmetric Key Embedded Encryption
• SHA-1
Libraries. Developed for Microchip by NTRU Cryptosystems
• MD5
Inc., a leader in encryption solutions, these libraries are
• Random number generator (DRBG X9.82)
both proven and optimized. These library functions can be
easily called by your C or Assembly code.
The algorithms included in these libraries have emerged Asymmetric Key Embedded Encryption Library features:
as de facto standards for many large scale secure • RSA (1024-bit and 2048-bit modulus)
applications such as web access (SSL/TLS), E-mail -- Encyption/decryption
(S-MIME), secure XML transactions and virtual private -- Signing/verification
networks (IPsec). These algorithms are also recommended • DSA (1024-bit modulus)
by Federal Information Processing Standards (FIPS) and the -- Private/public key generation
Internet Engineering Task Force (IETF). -- Signing/verification
• Diffie-Hellman Key Agreement (1024-bit and 2048-bit modulus)
-- Private/public key generation
-- Shared-key generation
• SHA-1
• MD5
• Random number generator (DRBG X9.82)
15
Operating Systems and Communication Drivers
RTOS
If you need a Real-Time Operating System (RTOS) to handle multitasking, we have a
three-tier solution for you. RTOS features:
• Small program memory footprints
• CMX-RTX™: full-featured fully preemptive multi-tasking OS • The fastest context switch times
• CMX-Tiny+™: fully preemptive scaled-down version of the RTX OS • The lowest interrupt latency times
• CMX-Scheduler™: fully preemptive multi-tasking mini OS (FREE) • True Preemption
All three operating systems are fully preemptive and written in Assembly
language optimized for maximum performance. These RTOS products are
developed by CMX and available from Microchip and CMX.
MPLAB PM3
Device Programmer
MPLAB PM3 Device Programmer is a full-featured,
production quality universal device programmer.
Using interchangeable socket modules, the MPLAB
PM3 supports virtually all programmable devices
from Microchip. MPLAB PM3 has improved
programming time for many devices and offers
built-in interface for robust In-Circuit Serial
Programming™ (ICSP™).
19
Software Development Tools
Development Tool Product Name Description Part# Available From List Price (1)
MPLAB® IDE Integrated Development Environment SW007002 Microchip Free
MPLAB® ASM30 Assembler (included in MPLAB® IDE) SW007002 Microchip Free
Software
MPLAB® SIM Software Simulator (included in MPLAB® IDE) SW007002 Microchip Free
MPLAB® VDI Visual Device Initializer for dsPIC30F (included in MPLAB® IDE) 02 Microchip Free
MPLAB® C30 ANSI C Compiler, Assembler, Linker and Librarian SW006012 Microchip $895
Embedded Workbench for ISO/ANSI C and Embedded C++ compiler in a professional, extensible IDE
C Compilers EWdsPIC 1 IAR Contact Vendor
dsPIC30F (Windows® NT/2000/Windows XP®) Special DSP support included.
C compiler ANSI C compiler for dsPIC30F dsPICC HI-TECH $950
Documentation(2)
Document Type Document Title Document Number
dsPIC30F High Performance 16-bit Digital Signal Controller Family Overview DS70043
Overview
dsPIC30F Data Sheet, General Purpose and Sensor Families DS70083
Documents
dsPIC30F Data Sheet, Motor Control and Power Conversion Family DS70082
dsPIC30F2010 Data Sheet DS70118
dsPIC30F2011, dsPIC30F2012, dsPIC30F3012, dsPIC30F3013 Data Sheet DS70139
dsPIC30F3010, dsPIC30F3011 Data Sheet DS70141
dsPIC30F3014, dsPIC30F4013 Data Sheet DS70138
Data Sheets
dsPIC30F4011, dsPIC30F4012 Data Sheet DS70135
dsPIC30F5011, dsPIC30F5013 Data Sheet DS70116
dsPIC30F6010 Data Sheet DS70119
dsPIC30F6011, dsPIC30F6012, dsPIC30F6013, dsPIC30F6014 Data Sheet DS70117
dsPIC30F Programmer’s Reference Manual DS70030
Reference Manuals
dsPIC30F Family Reference Manual DS70046
AN901- Using the dsPIC30F for Sensorless BLDC Control DS00901
AN908 - Using the dsPIC30F for Vector Control of an AC Induction Motor DS00908
Application Notes AN957 - Sensored BLDC Motor Control Using dsPIC30F2010 DS00957
AN962 - Implementing Auto Baud on dsPIC30F Devices DS00962
AN984 - An Introduction to AC Induction Motor Control Using the dsPIC30F DS00984
Technical CD dsPIC30F Technical CD-ROM (contains all of the above) DS70084
(2) Note that all the latest revisions of these documents are always available from the Microchip web site.
www.microchip.com
2355 West Chandler Boulevard • Chandler, AZ 85224-6199
Information subject to change. The Microchip name, the Microchip name and logo, dsPIC, MPLAB and PRO MATE are registered trademarks and ICSP, In-Circuit Serial Programming, dsPICDEM, dsPICDEM.net
and dsPICworks are trademarks in the U.S.A. and other countries. All other trademarks mentioned herein are property of their respective companies. ©2005 Microchip Technology Inc. All rights reserved.
Printed in the U.S.A. DS70095H 3/05