Digital Signal Processing - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Digital Signal Processing

Description:

Digital Signal Processing TMS320F2812 By Mr.Rungwicha Chaiyot – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 37
Provided by: iLLu5
Category:

less

Transcript and Presenter's Notes

Title: Digital Signal Processing


1
Digital Signal Processing TMS320F2812 ?????????
By Mr.Rungwicha Chaiyot
2
TMS320F2812 ????????????????????????????????????
???? (Texas Instrument) ??????????????????????????
????????????????????????????????? ??????????????
-Two event-manager modules (EVA,EVB) -Enhanced
analog-to-digital converter (ADC)
module -Digital I/O and shared pin function
3
EVENT MANAGER (EV) Module ???????????????????????
????????????????????????????????????? ????????????
??? ?????????? EVA,EVB ???????????????????????
multi-axis/motion control ???? -??????????????????
? -?????????????????????????????? ????? EV Module
?? full compare unit 3 ????? ????????? PWM
?????????? 6 ??????????????? dead band
?????????dead band ???????????????????????????????
? Compare Register ???
4
EV ????????????? General-Purpose (GP) Timers
????????? Time base ?????? Compare unit
????????????????????????????? ?????? PWM
????????? 1
?????? 1 ????????????????? PWM

5
GP Timer Counting Operation Compare output ??? GP
Timer ??????????? active high,active low force
high,force low ??? GP Timer ?????????????????????
????????????? 4 ??? -Stop/Hold mode -Continuous
Up-Counting mode -Directional Up-/Down-Counting
mode -Continuous Up-/Down-Counting mode
??????????????????????????????? timer control
register (TxCON) ?????? 11-12
6
Stop/Hold Mode ????????? GP Timer
???????????????????????????????????? ??? timer
counter,compare output ????????????????????? Cont
inuous Up-Counting mode GP Timer
???????????????????????????????? timer counter
???????????? Period register??????????????????????
input clock ???? ??? GP Timer ??????????? 0
???????????????????????????? ????????? 2
7
?????? 2 GP Timer Continuous Up-Counting mode
GP Timer ????????? Continuous Up-Counting
mode ???????????????????? PWM ??? Asynchronous
8
Directional Up-/Down-Counting mode ????????? GP
Timer ????????????????? ?????????????? TDIRA/B
??? GPIO PORT -TDIRA/B ???? high GP Timer
??????????????????????? Period register Timer
??????????? 0 ?????????????????????? -TDIRA/B
???? low GP Timer ????????????????????? 0 ???
Timer ?? reloads ??????????????Period register
???????????????????? ????????? 3
9
?????? 3 Directional Up-/Down-Counting mode
GP Timer ????????? Up-/Down-Counting mode
??????????????????? ??????????????????????????????
?? power electronics application
10
  • Continuous Up-/Down-Counting mode
  • ???????????????????????????? Direction
    Up-/Down-Counting
  • mode ??? PIN TDIRA/B ??????????????????????
  • -???????????????????????? up to down ????? timer
    counter
  • ???????????? Period register
  • ???????????????????????? down to up ????? timer
    counter
  • ???????????? 0
  • ???????? 4

11
?????? 4 Continuous Up-/Down-Counting mode
Continuous Up-/Down-Counting mode ???????? PWM
??? Symmetric ??? period ??? timer
???????????????????????????? Period register
(TxPR)
12
Asymmetric/Symmetric Waveform Generation asymmetr
ic /symmetric PWM wave form ??????????? ??????
counting mode ???????????? GP Timer Asymmetric
Waveform Generation ????? GP Timer ??????
continuous up-counting mode. output waveform
(PWM) ???????????????????????? -????? 0 ????
timer counter ??????? -??????????????????????????
compare math (timer counter compare
register) -Toggle ???????????? compare
math -??????????????????????????
period -????????? 0 ??????? period
13
?????? 5 GP Timer Compare/PWM Output in
Up-Counting Mode
14
Symmetric Waveform Generation ????? GP Timer
?????? continuous up-/down counting mode. output
waveform (PWM) ???????????????????????? -????? 0
???? timer counter ??????? -??????????????????????
???? compare math (timer counter compare
register) -Toggle ???????????? compare math
-?????????????????????????? compare math
??????????? -Toggle ???????????? compare math
??????????? -??????????????????????????
period -????????? 0 ??????? period
15
?????? 6 GP Timer Compare/PWM Output in Up-/Down
Counting Mode PWM
Output ???????????????? active high,active low,
force low,force high ??????????????????????
ACTRA/B register
16
PWM5AL
PWM6AH
0 0 0 0
1 0 0 1
1 0 0 1
1 0 0 1
PWM1AL
PWM2AH
PWM3AL
PWM4AH
?????? 7 ACTRA
Compare Unit1 Bit0-3 PWM1,PWM2 Compare Unit2
Bit 4-7PWM3,PWM4 Compare Unit3 Bit
8-11PWM5,PWM6 ACTRA0999
PWM2 AH PWM1 AL
?????? 8 Symmetrical PWM1,PWM2
17
?? register ???????????????????????????????????
PWM ????? ??????????????? litrrature number
SPRU065
18
General-Purpose Input/Output (GPIO)
GPIO MUX register ???????????????????????????????
PIN ?????????????????????????????????????????????
??????????????? -Digital I/O ???? Peripheral ???
GPxMUX registers -??????? Digital I/O
???????????? Input/Output ??? GPxDIR
registers ????? Port ??? GPIO
?????????????? MUX, Direction, Data, Set, Clear,
Toggle Registers
19
GPxMUX Registers ????? Port ??? GPIO ??? MUX
registers ???????????????????? ???????????????????
???????????????Digital I/O IF GPxMUX.bit0
Pin ???????????? Digital I/O IF GPxMUX.bit1
Pin ??????????????????????????
GPxDIR Register ????? Port ??? GPIO ??? GPxDIR
registers ???????????????????? ???????????? Input
???????? Output IF GPxDIR.bit0 Pin ????????????
Input IF GPxDIR.bit1 Pin ???????????? Output
XPORT A,B,D,E,F,G
20
GPxDAT Registers ????? Port ??? GPIO ??? GPxDAT
registers ??????????????????? ??????????? I/O IF
GPxDAT.bit0, PIN ????????? Output ????????? PIN
?????????????? Low IF GPxDAT.bit1, PIN
????????? Output ????????? PIN ??????????????
High
21
GPxSET Register ????? Port ??? GPIO ??? GPxSET
registers ??? PIN ???????????????????? Output IF
GPxSET.bit0, ignored (no effect) IF
GPxSET.bit1, PIN ????????? Output ????????? PIN
?????????????? High
GPxCLEAR Registers ????? Port ??? GPIO ???
GPxCLEAR registers ??? PIN ????????????????????
Output IF GPxCLEAR.bit0, ignored (no effect) IF
GPxCLEAR.bit1, PIN ????????? Output ?????????
PIN ?????????????? Low
22
GPxTOGGLE Registers ????? Port ??? GPIO ???
GPxToggle registers ??? PIN ????????????????????
Output IF GPxToggle.bit0, ignored (no effect) IF
GPxToggle.bit1, PIN ????????? Output ?????????
PIN ???????????????????????????
23
C28x GPIO Pin Assignment
BIT ???????? GPIO D,E,G,F ??? Reserved
?????????? PIN ?? eZDSP_TMS320F2812 board
???????? 2812_ezdsp_TechRef_F.pdf
24
???????? 1 PIN Assigment ?? P4 ??? P8 ??? DSP
board
25
Ex. Example_281xEvPwm.c //Description include
header_file //?????? function
??????????????? void init_eva(void) void
init_evb(void) // void main(void) init_eva(
) init_evb( ) for( ) void init_eva(
) void init_evb( )
(generate PWM1-12)
(????????????????????????????)
(function ???? init_eva/b ?????????????? ?????????
?/?????????????void)
(?????????????????????????? main)
(???????? function init_eva )
(???????? function init_eva )
(Idle Loop)
(????? function ???? init_eva() )
(????? function ???? init_eva() )
26
???????? project
1. Menu Project-gtNew
27
Project Name ProjectPwm
Location c\Project
Project Type Executable(.out)
Target TMS320C28XX
Click Finish
NOTE?? Folder Project ????? header file ??? C
Source code ?????????????? Default ???
DSP????????????????
28
2.????? C-Source Code
Menu File-gtNew-gtSource File
29
MenuFile-gtSave as
30
Save in project FilenameProjectPwm Save as
type C Source Files Click Save
31
3. Add code file to the project Menu
Project-gtAdd files to project ????? Folder
Project projectPwm.c DSP281x_Codestartbranch.
asm DSP281x_Defaultsisr.c DSP281x_Globalvariable
def.c DSP281x_PieCtrl.c DSP281x_PieVect.c DSP28
1x_SysCtrl.c DSP281x_header_nonBIOS.cmd EzDSP_RA
M_INK.cmd

?????? PWM
???????? Default ??? register ??? DSP
Link Command File
Link Command File ??????????????????????????????
??????????
32
4. Add the C-runtime-library to
Project Project-gtBuild Option Linker-gtLibrary
Search Patch TypeC\Ti\c2000\cgtools\lib Linker-gt
Include Libraries Typerts2800_ml.lib
Add the stack-size of 0x400 Linker-gtStack
Size(-Stack) Type 0x400
Close Build Option Click OK
33
5. Menu Project-gtBuild
34
6. Load File projectPwm.out and run Program Menu
File-gtLoad Program
-gtprojectPwm.out -gtClick Open
35
Run Program
Halt Program
36
REFERENCE
1.Texas Instrument TMS320x281x DSP Event Manager
(EV) Referencre Guide. (SPRU065d)
November2004 2.Texas Instrument TMS320x281x DSP
System Control and Interrupts Refer Ence Guide.
(SPRU078C) March2005 3.Texas Instrument
ACI3_1For TMS320F281X Setup Company. (SPRC130)
Write a Comment
User Comments (0)
About PowerShow.com