资源简介
SVPWM.zip
代码片段和文件信息
// TI File $Revision: /main/8 $
// Checkin $Date: April 21 2008 15:41:53 $
//###########################################################################
//
// FILE: Example_2833xEPwmUpDownAQ.c
//
// title: 空间电压矢量产生程序SVPWM
//
// ASSUMPTIONS:
//
// This program requires the DSP2833x header files.
//
// Monitor ePWM1-ePWM3 pins on an oscilloscope as described
// below.
//
// EPWM1A is on GPIO0-------5脚
// EPWM1B is on GPIO1-------6脚
//
// EPWM2A is on GPIO2-------7脚
// EPWM2B is on GPIO3-------10脚
//
// EPWM3A is on GPIO4-------11脚
// EPWM3B is on GPIO5-------12脚
//
//
//###########################################################################
// $TI Release: DSP2833x/DSP2823x Header Files V1.20 $
// $Release Date: August 1 2008 $
//###########################################################################
#include “DSP28x_Project.h“ // Device Headerfile and Examples Include File
// Prototype statements for functions found within this file.
void InitEPwm1Example(void);
void InitEPwm2Example(void);
void InitEPwm3Example(void);
void svpwmGen(void);
interrupt void svpwm_isr(void);
volatile float UalphaUbeta;
volatile float ABC;
volatile float T0T1T2T3T4T5T6;
volatile float TaonTbonTcon;
float UaUbUc;
float Ts;
int abc;
int N= 0sector= 0;
#define TPRD 800
#define Udc 800
void main(void)
{
// Step 1. Initialize System Control:
// PLL WatchDog enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
InitSysCtrl();
// Step 2. Initalize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it‘s default state.
// InitGpio(); // Skipped for this example
// For this case just init GPIO pins for ePWM1 ePWM2 ePWM3
// These functions are in the DSP2833x_EPwm.c file
InitEPwm1Gpio();
InitEPwm2Gpio();
InitEPwm3Gpio();
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
InitPieCtrl();
// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
InitPieVectTable();
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13187 2012-11-27 21:15 SVPWM.c
相关资源
- ATmega2560_Library.SchLib
- 1306176648Sockets进行文件传输.zip
- PDFFactoryProversion4.05.Keygen.zip
- 文件校验工具MD5SHA1SHA210.2TOKYOHOT含源码
- CPrimer第5版_带书签_高清完整版.pdf.r
- 扫雷.rar
- CallTifftoy.rar
- mwkiim.doc
- 地址链接.txt
- Thief.rar
- TurboCodeDemo.rar
- MusicEncode.rar
- fft7.v
- cuda_8.0.61_win10.exe.txt
- diramisumy_2329847.rar
- uxibzj.rar
- M1卡初始化工具.rar
- 基于51单片机的智能窗帘系统全套资料
- 高级数据结构课设1.7z
- 网杀v7.2.exe
- 千锋教育微信小程序全套开发视频教
- 微信小程序小游戏教程视频代码.zip
- string.rar
- 北京理工大学模拟电子技术实验二-
- JetbrainsCrack-2.9-release-enc.rar
- 贪吃蛇1.0.zip
- c编程练习题目及答案2.zip
- 辨识水箱系统.docx
- 51单片机的计算器.rar
- 2[1].2的控制端2008.6.12更新.zip
评论
共有 条评论