Advanced Solutions SellingChoose Your Dance Partner PIC® MCU or dsPIC® DSC?… Choose Your Dance Partner Overview of new features of dsPIC® digital signal controller DSC You should get
Trang 1ADVANCED SOLUTIONS SELLING
2004 Worldwide Sales Conference
ADVANCED SOLUTIONS SELLING
2004 Worldwide Sales Conference
434 HOW
434 HOW
dsPIC® DSC … What makes it tick?
It’s really slick.
Trang 2Digital Signal Controller
PIC® MCU or dsPIC® DSC?… Choose Your Dance Partner
Digital Signal Controller
PIC® MCU or dsPIC® DSC?…
Choose Your Dance Partner
The 16-bit MCU with the power of DSP
Trang 3Advanced Solutions Selling
Choose Your Dance Partner
PIC® MCU or dsPIC® DSC?… Choose Your Dance Partner
Overview of new features of dsPIC® digital signal controller (DSC)
You should get a perspective of the differences
You should know the key system requirements that mean a
customer should be using dsPIC DSC
Your presenter : Steven Lin
Overview of new features of dsPIC® digital signal controller (DSC)
You should get a perspective of the differences
You should know the key system requirements that mean a
customer should be using dsPIC DSC
Trang 4Advanced Solutions Selling
Dance with who brung ya…
Let’s Keep the Good Stuff from PIC® MCU
On dsPIC® DSC
Trang 5Advanced Solutions Selling
dsPIC® / PIC® Compatibility
Are your customers nervous about stepping up to a dsPIC DSC?
a little dsP plus a lot of PIC MCU
Are your customers nervous about stepping up to a dsPIC DSC?
Trang 6Advanced Solutions Selling
Compatibility allows customers to apply PC board lessons learned
on one product to another
High degree of pinout compatibility for PIC® MCU and dsPIC® DSC
100% Compatible on
Power / Ground, Master Clear, Oscillator
Compatible on analog
Compatibility allows customers to apply PC board lessons learned
on one product to another
Vss
Vdd Vdd Vss
AN4 AN3 AN2 AN1 AN0
Trang 7Advanced Solutions Selling
dsPIC® Peripherals have the same I/O as PIC peripherals
dsPIC Peripherals have the same functionality as PIC® peripherals
dsPIC® Peripherals have the same I/O as PIC peripherals
dsPIC Peripherals have the same functionality as PIC® peripherals
Peripheral Compatibility
TMR TMR
SPI
SDO SDI SCK
CCP CCP
UART
TX RX
I2C
SCL SDA CAN
TXx RXx
TMR TMR
SPI
SDO SDI SCK
IC IC/OC OC
UART
TX RX
I2C
SCL SDA CAN
TXx RXx
Trang 8Advanced Solutions Selling
dsPIC INSTRUCTIONS
Instruction Set Compatibility
dsPIC ® processor architecture is based on PIC ® MCU
dsPIC Programmers Model is a superset of PIC MCU
Most PIC18 instructions are included in dsPIC DSC
dsPIC ® processor architecture is based on PIC ® MCU
dsPIC Programmers Model is a superset of PIC MCU
Most PIC18 instructions are included in dsPIC DSC
PIC INSTRUCTIONS
Trang 9Advanced Solutions Selling
Tools Compatibility
All Microchip Tools are useable on dsPIC® DSC
Same user interface
PIC® customer is totally comfortable using dsPIC tools
All Microchip Tools are useable on dsPIC® DSC
Same user interface
PIC® customer is totally comfortable using dsPIC tools
Trang 10Advanced Solutions Selling
Start the Music
Did you know that a MP3 Player is
doing
DSP Processing
Trang 11Advanced Solutions Selling
Typical DSP System
What does a typical DSP system look like?
dsPIC30F6014
It takes real world signal
It takes real world signal
Processes the signal using digital calculations
Processes the signal using digital calculations
Outputs a resulting real world signal
Outputs a resulting real world signal
But doesn’t a microprocessor system do the same thing? What’s different about DSP?
Let’s dig a little deeper
But doesn’t a microprocessor system do the same thing? What’s different about DSP?
Let’s dig a little deeper
Trang 12Advanced Solutions Selling
Noisy Audio
dsPIC30F6014
Digital Filter
A digital filter is used to mathematically
signal
Clear Audio
10011100 01110111 11001101
Real time audio signal output
Trang 13Advanced Solutions Selling
DSP Key Words
Audio (a song) doesn’t sound right stopped in the middle
Real time means the processing cannot wait, requires very high speed processing
If the customer requires Real Time, look to dsPIC® DSC
Digital Filter
Filters will modify or clean a signal
Many customer systems will require some type of Digital Filter to process the signal
A DSP contains many specialized instructions that help the
customer filter the signal
If the system requires Digital Filters, look to dsPIC DSC
Real Time
Audio (a song) doesn’t sound right stopped in the middle
Real time means the processing cannot wait, requires very high speed processing
If the customer requires Real Time, look to dsPIC® DSC
Digital Filter
Filters will modify or clean a signal
Many customer systems will require some type of Digital Filter to process the signal
A DSP contains many specialized instructions that help the
customer filter the signal
If the system requires Digital Filters, look to dsPIC DSC
Trang 14Advanced Solutions Selling
DSP Motor Control System
In this system
Position sensors detect Real Time motor position
Output voltage controls the Real Time motor movement
Processor uses Digital Control Loop to compute voltage required
to achieve desired position
Key Words: Digital Control Loop
In this system
Position sensors detect Real Time motor position
Output voltage controls the Real Time motor movement
Processor uses Digital Control Loop to compute voltage required
to achieve desired position
Key Words: Digital Control Loop
Motor Position 10011011 01110101 Motor Voltage
11001011
10011100 01110111 11001101
Digital Control Loop
Trang 15Advanced Solutions Selling
DSP Key Words
Digital Control Loop
A digital control loop mathematically interprets the signal, in this case, position information, making sure it’s at the desired value
Digital control loops require high precision numbers and lots of multiplies
If the customer requires Digital Control Loop, look to dsPIC® DSC
Any application that requires
Fast real time processing of real world signals
High precision computations, For example 32-bit
Digital Control Loop
A digital control loop mathematically interprets the signal, in this case, position information, making sure it’s at the desired value
Digital control loops require high precision numbers and lots of multiplies
If the customer requires Digital Control Loop, look to dsPIC® DSC
Any application that requires
Fast real time processing of real world signals
Complex mathematic computations
High precision computations, For example 32-bit
Look to dsPIC DSC
Trang 16Advanced Solutions Selling
DSP Anti-Lock Brake System (ABS)
In this system
Sensors detect Real Time wheel speed data
Output signal controls the Real Time brake pressure
Processor uses Digital Filters to detect changes in wheel speed and Digital Control Loop to modulate brake
pressure
In this system
Sensors detect Real Time wheel speed data
Output signal controls the Real Time brake pressure
Processor uses Digital Filters to detect changes in wheel speed and Digital Control Loop to modulate brake
pressure
ABS Brakes
10011011 01110101 11001011
Digital Filter / Contro l Loop
10011100 01110111 11001101
Wheel Speed
Trang 17Advanced Solutions Selling
Special DSP Instructions
What special instructions are used in a filter or control loop?
There is a set of special DSP instructions included in dsPIC® DSC that speed processing of the typical mathematic calculations used in filters and control loops
MAC instruction – Multiply and Accumulate
Also Multiply and Subtract, Square and Accumulate, etc
19 special DSP instructions total
MULTIPLY, DIVIDE and bit shift instructions
REPEAT instruction – repeats an instruction many times
With DSP instructions, this complex equation can be computed using only 2 instruction words and 5 instruction cycles!
What special instructions are used in a filter or control loop?
There is a set of special DSP instructions included in dsPIC® DSC that speed processing of the typical mathematic calculations used in filters and control loops
MAC instruction – Multiply and Accumulate
Also Multiply and Subtract, Square and Accumulate, etc
19 special DSP instructions total
MULTIPLY, DIVIDE and bit shift instructions
REPEAT instruction – repeats an instruction many times
With DSP instructions, this complex equation can be computed using only 2 instruction words and 5 instruction cycles!
n b0x n b1x n 1 b2x n 2 b3x n 3
y
Trang 18Advanced Solutions Selling
Special DSP Addressing
Modes
Special DSP Addressing
Modes
What other dsPIC® DSC features help the customer make a filter or
digital control loop?
DSP calculations involve a lot of data words dsPIC DSC has special addressing modes that help
Modulo addressing – scans through a block of data
Bit reversed addressing – needed by Fast Fourier Transform (FFT) calculation software
16-bit and 32-bit data move operations
DSP calculations also need to adjust the values of the data Your DSP customers will call this “scaling”
dsPIC uses a 40-bit accumulator and has automatic scaling of data on reads and writes
What other dsPIC® DSC features help the customer make a filter or
digital control loop?
DSP calculations involve a lot of data words dsPIC DSC has special addressing modes that help
Modulo addressing – scans through a block of data
Bit reversed addressing – needed by Fast Fourier Transform (FFT) calculation software
16-bit and 32-bit data move operations
DSP calculations also need to adjust the values of the data Your DSP customers will call this “scaling”
dsPIC uses a 40-bit accumulator and has automatic scaling of data on reads and writes
Trang 19Advanced Solutions Selling
Special DSP Features
How does dsPIC® DSC assist Real Time processing?
30 MIPS – up to 30 million calculations per second
Powerful instructions do many operations at the same time
Example: MAC instuction
Gets 2 data values from memory
Multiplies them together
Adds the result to the accumulator
What does dsPIC® DSC have to help with high precision calculations?
The working registers of dsPIC® DSC are all 16-bits
The dsPIC® DSC does 32-bit multiply and 32-bit divide
The dsPIC® DSC has a 40-bit accumulator for calculation results
Special instructions allow simple transfers of 16 and 32-bit data
How does dsPIC® DSC assist Real Time processing?
30 MIPS – up to 30 million calculations per second
Powerful instructions do many operations at the same time
Example: MAC instuction
Gets 2 data values from memory
Multiplies them together
Adds the result to the accumulator
What does dsPIC® DSC have to help with high precision calculations?
The working registers of dsPIC® DSC are all 16-bits
The dsPIC® DSC does 32-bit multiply and 32-bit divide
The dsPIC® DSC has a 40-bit accumulator for calculation results
Special instructions allow simple transfers of 16 and 32-bit data
Trang 20Advanced Solutions Selling
How is dsPIC® DSC different
One instruction set
One register file
dsPIC® DSC seamlessly
integrates the PIC
Microcontroller functions
and DSP functions
One instruction set
One register file
DSP + PIC
MCU
DSP
instructions to a DSP architecture
peripherals to a MCU architecture
Other solutions either
instructions to a DSP architecture
peripherals to a MCU architecture
Trang 21Advanced Solutions Selling
Knowledge Check
What does the MAC instruction do?
A: More Adding and CarryingB: Multiply and AccumulateC: Move All Cells
A customer is building a security system that will monitor the signal from
a glass break sensor dsPIC® DSP features can:
A: Multiply the thickness of the glassB: Implement a filter to check for signals associated with breaking glass
C: Add up the cost of the glass
What does the MAC instruction do?
A: More Adding and Carrying
B: Multiply and Accumulate
C: Move All Cells
A customer is building a security system that will monitor the signal from
a glass break sensor dsPIC® DSP features can:
A: Multiply the thickness of the glass
B: Implement a filter to check for signals associated with
breaking glass
C: Add up the cost of the glass
Trang 22Advanced Solutions Selling
Knowledge Check
Super Bonus Question:
What is this equation used for?
What is it called?
Super Bonus Question:
What is this equation used for?
What is it called?
n b0x n b1x n 1 b2x n 2 b3x n 3
y
This equation is a digital filter
Finite Impulse Response (FIR) Filter
Trang 23Advanced Solutions Selling
Shake that BIG Booty
Does your customer have a big …
PROGRAM?
Trang 24Advanced Solutions Selling
dsPIC30F CPU
Single Core : MCU + DSP
Instruction is 24-bit wide
Total Space:
4M x 24-bit Linear Program Space
Devices contain up to 144K
Byte Flash Memory
Single Core : MCU + DSP
Instruction is 24-bit wide
Total Space:
4M x 24-bit Linear Program Space
Devices contain up to 144K
Byte Flash Memory
144K Flash
4M Total
24 Bit Instruction
Trang 25Advanced Solutions Selling
dsPIC30F CPU
Data is 16-bit wide
Total Space:
64K Bytes Linear Data Space
Devices contain up to 16K
Byte User RAM
Plenty of room for your
customers largest applications
Data is 16-bit wide
Total Space:
64K Bytes Linear Data Space
Devices contain up to 16K
Byte User RAM
Plenty of room for your
customers largest applications 16K RAM
64K Total
16 Bit Data
Trang 26Advanced Solutions Selling
It takes Two to Tango
Processor Features that Dance with the C Compiler
for Efficient Code
Trang 27Advanced Solutions Selling
How did the C Compiler Get So
+New MCU instructions
+More flexible addressing
=Smallest C code
Software stack
+Working Register Array
+New MCU instructions
+More flexible addressing
Trang 28Advanced Solutions Selling
C compiler can allocate as much stack
space as needed and use it for
C compiler can allocate as much stack
space as needed and use it for
PC<15:1>
PC<22:16> 000000000
0 Parameter 3 = W2 Parameter 2 = W1 Parameter 1 = W0 INT34 return addr
W15 >
SUBR3 return addr
Trang 29Advanced Solutions Selling
Why so many W Registers
Why so many W Registers
Stack Pointer
W0 W1 W2 W3 W4 W5 W6 W7 W8 W9 W10 W11 W12 W13 W14 W15
15 0
Frame Pointer PIC ® compatible WREG
15 0
0
Array of 16 working registers
C compiler has many resources available
Any W register can be used as
A data register or
An address pointer
Flexibility helps the C compiler
optimize code
Array of 16 working registers
C compiler has many resources available
Any W register can be used as
A data register or
An address pointer
Flexibility helps the C compiler
optimize code
Working registers also store data and addresses used in DSP
calculations, no need for special DSP registers
Working registers also store data and addresses used in DSP
calculations, no need for special DSP registers
Trang 30Advanced Solutions Selling New Addressing Modes
File Register (PIC18 Compatible)
Flexible addressing modes helps the C compiler access data with minimum overhead.
Results - more compact code
Trang 31Advanced Solutions Selling
New MCU Instructions
Powerful MCU instructions reduce number of instructions required to realize function
3-operand MCU instructions
Multiply and Divide instructions
REPEAT and DO loops simplify program flow control
All Instructions can use software stack
Powerful MCU instructions reduce number of instructions required to realize function
3-operand MCU instructions
ADD A,B,C -> C = A + B
Multiply and Divide instructions
REPEAT and DO loops simplify program flow control
All Instructions can use software stack