Module - 01 DSP
Module - 01 DSP
Module 1: Introduction
1-1
DSP2833x - Introduction
1-1
Module Topics
Module Topics
Introduction ................................................................................................................................................1-1
Welcome to the F2833x - Tutorial ...........................................................................................................1-1
Module Topics..........................................................................................................................................1-2
CD ROM Structure ...............................................................................................................................1-3
Template Files for Laboratory Exercises .................................................................................................1-4
What is a Digital Signal Controller? .......................................................................................................1-6
A typical micro processor block diagram ............................................................................................1-7
Arithmetic Logic Unit (ALU) of a microprocessor..........................................................................1-9
The Desktop PC: a Microcomputer ................................................................................................1-11
The Microcontroller: a single chip computer.....................................................................................1-12
The MSP430 a typical micro controller ..........................................................................................1-13
A Digital Signal Processor.................................................................................................................1-14
The Sum of Product Equation .....................................................................................................1-15
A SOP executed by a DSP .................................................................................................................1-17
A Digital Signal Controller ................................................................................................................1-18
DSP Competition ...................................................................................................................................1-19
Texas Instruments DSP/DSC Portfolio ...............................................................................................1-20
TMS320F28x Roadmap .........................................................................................................................1-21
TMS320F28x Application Areas ............................................................................................................1-22
TMS320F28x Block Diagram ................................................................................................................1-23
1-2
DSP2833x - Introduction
CD ROM Structure
CD ROM Structure
Chapter 1: Introduction to Microprocessor, MCU and DSP
Chapter 2: TMS320F28335 Architecture
Chapter 3: Software Development Tools
Chapter 4: Fixed Point, Floating Point or both?
Chapter 5: Digital Input/Output
Chapter 6: Understanding the F28335 Interrupt System
Chapter 7: Control Actuators and Power Electronics
Chapter 8: Sensor Interface - Analogue to Digital Converter
Chapter 9: Communication I: Serial Communication Interface
Chapter 10: Communication II: Serial Peripheral Interface
Chapter 11: Communication III: Controller Area Network (CAN)
Chapter 12: Communication IV: Inter Integrated Circuit
Chapter 13: Communication V: Multi Channel Buffered SerialPort
Chapter 14: Internal FLASH Memory and stand alone control
Chapter 15: Boot loader and Field update
Chapter 16: FLASH Application Program Interface (API)
Chapter 17: IQ-Math and floating point hardware
Chapter 18: Digital Motor Control
Chapter 19: Digital Power Supply
DSP2833x - Introduction
1-3
Core Timer 0 and Interrupts - add a hardware timer to Lab5_1 and use an interrupt
service routine (hardware time base framework)
Lab7_1:
Lab7_2:
Lab7_3:
Lab7_4:
Lab7_5:
1-4
DSP2833x - Introduction
Lab17:
IQ-MATH
DSP2833x - Introduction
1-5
Microprocessor (P)
Micro Computer
Microcontroller (C)
1. what is a microprocessor?
microprocessor (P, mp):
Central Device of a multi chip Micro Computer System
Two basic architectures:
Von Neumann- Architecture
Harvard Architecture
Von Neumann - Architecture:
Shared memory space between code and data
Shared memory busses between code and data
Example: Intels x86 Pentium Processor family
Harvard Architecture:
Two independent memory spaces for code and data
Two memory bus systems for code and data
A P needs additional external devices to operate properly
1-2
Microprocessors are based on a simple sequential procedural approach: Read next machine code
instruction from code memory, decode instruction, read optional operands from data memory,
execute instruction and write back result. This series of events runs in an endless manner. To use
a P one has to add memory and additional external devices to the Microprocessor.
1-6
DSP2833x - Introduction
Microprocessor
input
module
Central
Processing Unit
CPU
output
module
process
process
Control Unit
data
memory
1-3
A typical microprocessor block diagram is shown above. As can be seen from slide 1-3, the
microprocessor consists of two parts the control unit and the central processing unit (CPU). It
operates on input signals, reads operands from data memory, writes results back in data memory,
and updates output modules. All computing is based on machine code instructions, which are
sequentially stored in code memory. The microprocessor reads these instructions one after each
other into its control logic.
The execution flow of a piece of machine code instructions follows a certain sequence, shown in
the following slide. Life of a micro processor is quite boring; it never goes off the beaten track
unless it loses its power supply. The sequence is always:
1. Address the next entry in code memory
2. Read (or fetch) the next machine instruction from this very address
3. Look, whats up (decode that instruction and prepare next activities
4. Select one of five next steps:
Read an input and compute it
Read an entry from data memory and compute it
Do an internal operation, which does not require an information exchange
Write a result back in data memory
Update an output channel with a result of a previous computation
5. Calculate the next code memory address and return to step #1.
DSP2833x - Introduction
1-7
read input
& compute
internal
operation
update
output
write data
memory
1-4
The hearth of a micro processor is its Central Processing Unit (CPU). To keep it simple, we just
look at a very basic structure of a CPU. Today a micro - processor is really one of the most
complex integrated circuits.
CPU of a microprocessor
CPU =
Consists of:
Instruction decoder:
Address unit:
Register:
1-5
1-8
DSP2833x - Introduction
Addition (ADD)
Negation (NEG)
Conjunction (AND)
typical:
arithmetical:
Subtraction (SUB)
Multiplication (MUL)
logical:
Comparison (CMP)
Disjunction (OR)
Antivalence (EXOR)
miscellaneous: Right- and Left Shift (ASR,ASL)
Rotation (ROL, ROR)
Register-Bit-Manipulation (set, clear, toggle, test)
a ALU is able to process two binary values with equal length (N)
N-Bit ALU with N = 4,8,16,32 or 64
An ALU performs the arithmetic and logic operations that the micro - processor is capable of. A
minimal requirement for an ALU is to perform ADD, NEG and AND. Other operations shown in
the slide above, improve the performance of a specific micro - processor. A virtual ALU could
look like this:
A, B, Y:
Internal register
F:
Functional code
C:
Carry Bit
N:
Negative Bit
Z:
Zero - Bit
DSP2833x - Introduction
1-9
Execution - Unit
- CPU
- ALU
- Register
Bus - Unit
address
- Bus Control
- Address & Data Bus
Interface
- Instruction Queue
control/
status
data
Instruction Unit
- Decode Instruction
- Operation Queue
1-8
The Intel 8086 can be considered to be the veteran of all microprocessors. Inside this processor
four units take care of the sequence of states. The bus-unit is responsible for addressing the
external memory resources using a group of uni - directional digital address signals, bi-directional
data lines and control and status signals. Its purpose is to fill a first pipeline, called the
instruction queue with the next machine instructions to be processed. It is controlled by the
Execution unit and the Address-Unit.
The Instruction unit reads the next instruction out of the Instruction queue decodes it and fills a
second queue, the Operation queue with the next internal operations that must be performed by
the Execution Unit.
The Execution Unit does the real work; it executes operations or calls the Bus Unit to read an
optional operand from memory.
Once an instruction is completed, the Execution Unit forces the Address Unit to generate the
address of the next instruction. If this instruction was already loaded into the Instruction queue,
the operational speed is increased. This principle is called a cache.
We could go much deeper into the secrets of a Microprocessor; eventually you can book another
class at your university that deals with this subject much more in detail, especially into the pros
and cons of Harvard versus Von-Neumann Machines, into RISC versus CISC, versions of
memory accesses etc.
For now, let us just keep in mind the basic operation of this type of device.
1 - 10
DSP2833x - Introduction
2. our Desktop PC is a?
2. Microcomputer
Code - Memory
Data - Memory
Memory Bus
Clock
Timer/Counter
Microprocessor
Peripheral Bus
Digital In
Digital In
Analogue In
Analogue Out
1-9
microcomputer - peripherals
Peripherals include:
Digital Input / Output Lines
Analogue to Digital Converter (ADC)
Digital to Analogue Converter (DAC)
Timer / Counter units
Pulse Width Modulation ( PWM) Output Lines
Digital Capture Input Lines
Network Interface Units:
Serial Communication Interface (SCI) - UART
Serial Peripheral Interface ( SPI)
Inter Integrated Circuit ( I2C) Bus
Controller Area Network (CAN)
Local Interconnect Network (LIN)
Universal Serial Bus (USB)
Local / Wide Area Networks (LAN, WAN)
Graphical Output Devices
and more
1 - 10
DSP2833x - Introduction
1 - 11
3. System on Chip
3. Microcontroller (C, MCU)
Nothing more than a Microcomputer as a single
silicon chip!
All computing power AND input/output channels that
are required to design a real time control system are
on chip
Guarantee cost efficient and powerful solutions for
embedded control applications
Backbone for almost every type of modern product
Over 200 independent families of C
Both P Architectures (Von Neumann and
Harvard) are used inside Microcontrollers
1 - 11
1 - 12
DSP2833x - Introduction
There are hundreds of types of micro controllers in the highly competitive market of embedded
systems. They all have their pro and cons. Depending on the application area, budget limitations
and on project requirements one has to decide, which one is the best suited one. The slide above
shows a block diagram of one of the most power effective micro controllers in the market the
MSP430. It comes with integrated memory blocks FLASH for non - volatile storage of code
sequences and RAM to store variables and results. It is equipped with internal analog and digital
peripherals, communication channels.
DSP2833x - Introduction
1 - 13
Equation
Convolution
1 - 14
1 - 14
DSP2833x - Introduction
y = data[i ] * coeff [i ]
i =0
DSP2833x - Introduction
1 - 15
If we look a little bit more in detail into the tasks that needs to be solved by a standard processor
we can distinguish 10 steps. Due to the sequential nature of this type of processor, it can do only
one of the 10 steps at one time. This will consume a considerable amount of computing power of
this processor. For our tiny example, the processor must loop between step 3 and step 10 a total of
four times. For real Digital Signal Processing the SOP procedure is going to much higher loop
repetitions forcing the standard processor to spend even more computing power.
y = data[i ] * coeff [i ]
i =0
3.
4.
5.
6.
7.
8.
9. Increment I;
10. If i<3 , then go back to step 3 and continue
1 - 16
DSP2833x - Introduction
y = data[i ] * coeff [i ]
i =0
MCode
Assembly Instruction
FF69
SPM 0
8D04 0000R
MOVL XAR1,#data
76C0 0000R
MOVL XAR7,#coeff
5633
ZAPA
F601
RPT
#1
564B 8781
|| DMAC ACC:P,*XAR1++,*XAR7++
10AC
ADDL ACC,P<<PM
8D04 0000R
MOVL XAR1,#y
1E81
MOVL *XAR1,ACC
DSP2833x - Introduction
1 - 17
Note: Some manufacturers, like Infineon and Renesas, still call their DSCs microcontrollers.
This is because most target applications are typically regarded as microcontroller sockets and
many engineers are unfamiliar with the term DSC.
TI also recently changed the naming of the C2000 line from DSC to microcontroller.
1 - 18
DSP2833x - Introduction
DSP Competition
DSP Competition
There are only a few global players in the area of DSP and DSC. As you can see from the next
slide (for more details, go to: www.fwdconcepts.com ), Texas Instruments is the absolute leader
in this area. A working knowledge of TI-DSP will help you to master your professional career.
6%
12%
9%
Agere
14%
Analog Devices
Freescale
Texas Instruments
Other
59%
With such expertise in DSPs, it is only natural that the lessons TI has learned and technologies
developed for DSPs trickle down also to TIs microcontrollers. As the leader in DSP Texas
Instruments microcontrollers will also challenge the market!
4,6
3,2 2,8
8
Wireless
Consumer
9,1
Multipurpose
Computer
Wireline
Automotive
72,3
Relative
Source: www.forwardconcepts.com
1 - 22
DSP2833x - Introduction
1 - 19
Arm-Based
Microcontrollers
16-bit
MCU
32-bit
Real-time
MSP430
C2000
Ultra-Low
Power
Fixed &
Floating Point
Up to 25MHz
Flash
1KB to 256KB
32-bit
ARM
DSP
ARM+
ARM + DSP
DSP
ARM9
Cortex A-8
C64x+ plus
ARM9/Cortex A-8
C647x, C64x+,
C55x
Industry Std
Low Power
Industry-Std Core,
High-Perf GPP
Industry-Std Core +
DSP for Signal Proc.
Leadership DSP
Performance
Up to 150MHz
Up to 100MHz
Accelerators
4800 MMACs/
1.07 DMIPS/MHz
24,000 MMACS
Flash
32KB to 512KB
Flash
8KB to 256KB
MMU
MMU, Cache
Up to 3MB
L2 Cache
PWM, ADC,
CAN, SPI, I2C
USB, ENET,
ADC, PWM, HMI
USB, LCD,
MMC, EMAC
Measurement,
Sensing, General
Purpose
Motor Control,
Digital Power,
Lighting
Host Control,
general purpose,
motor control
Linux/WinCE
User Apps
Linux/Win +
Video, Imaging,
Multimedia
Comm, WiMAX,
Industrial/
Medical Imaging
$0.49 to $9.00
$1.50 to $20.00
$2.00 to $8.00
$8.00 to $35.00
$12.00 to $65.00
$4.00 to $99.00+
Stellaris
Cortex M3
VPSS, USB,
EMAC, MMC
1G EMAC, SRIO,
DDR2, PCI-66
1 - 23
The DSP / DSC portfolio of Texas instruments is split into three major device families, called
Microcontroller, ARM-based and DSP.
The C64x branch is the most powerful series of DSP in computing power. There are floating
point as well as fixed point devices in this family. The application fields are image processing,
audio, multimedia server, base stations for wireless communication etc.
The C55x family is focused on mobile systems with very efficient power consumption per MIPS.
Its main application area is cell phone technology.
The C2000 group is dedicated to Digital Signal Control (DSC), as you have learned from the
first slides and is a very powerful solution for real time control applications. This group is
accompanied at the two ends by a 16-bit Microcontroller group (MSP430) and 32-bit series of
ARM-core based microcontrollers (Cortex M3, Cortex A-8 or ARM9).
The next slide summarizes the main application areas for the 3 Texas Instruments families of
DSP.
1 - 20
DSP2833x - Introduction
TMS320F28x Roadmap
C5000
C6000
Lowest Cost
Efficiency
Performance &
Ease-of-Use
Control Systems
Motor Control
Storage
Digital Control Systems
Power Supply Control
TMS320F28x Roadmap
For the C2000 family we can distinguish between two groups of devices: a 16-bit group, called
TMS320C24x and a 32-bit group, called TMS320C28x.
1 - 25
DSP2833x - Introduction
1 - 21
The next Slide 1-26 illustrates the latest developments in the 32-bit real-time controller family
C28x:
C2834x
Sampling
200-300MHz
196-516kB SRAM
External ADC
Low Active Power
F2833x
Development
100-150MHz
128-512kB Flash
52-68kB SRAM
Future
Higher Performance
Connectivity
Safety Enhancements
PERFORMANCE
F2823x
F281x
F280x
Next Gen
F2803x
Fixed Point
Performance
Memory
Connectivity
F2802x
(100-176 Pins)
60 150 MHz
32 512kB Flash
3Ph PWM/QEP
12-bit, 2 SH ADC
(Up to 12.5 MSPS)
CAN, McBSP
UART, SPI
Next Gen
60MHz
Control Law
Accelerator
32-128kB Flash
CAN, LIN
40-60MHz
16-64kB Flash
Analog Comp
Low Power
Small Package
TIME
1 - 26
Renewable Energy
Wind Power Inverters
Power Tools
White Goods
Lighting
Digital Power
DC/DC
Converters
C2000
Uninterruptable
Power Supplies
Auto HID
Telecom / Server
AC/DC Rectifiers
Radar / Collision
Avoidance
Laser Ranging
Power Line
Communication
Medical Oxygen
Concentrators
LED TV
Backlighting
Optical
Networking
RFID Readers
Automotive
1 - 22
DSP2833x - Introduction
TMS320F28335
68 KB
RAM
512 KB
Flash
Boot ROM
18 PWM
(6 HRPWM)
Memory Bus
6 CAP
DMA
RMW
Atomic
ALU
32-bit
FloatingPoint Unit
2 QEP
Peripheral Bus
Interrupt Management
12-bit ADC
88 GPIO
16/32-bit
EMIF
SPI
3 SCI
2 McBSP
IC
2 CAN
1 - 28
DSP2833x - Introduction
1 - 23
Blank page
1 - 24
DSP2833x - Introduction