资源简介

利用光电编码器做位置采样的无刷直流电机程序,利用dsp2812

资源截图

代码片段和文件信息

/*==============================================================================
文件名: bldcm.c
日期:       2007年05月22日
公司(作者): ORIENT XI‘AN 
描述和说明: BLDCM
==============================================================================*/

// Include header files used in the main function
#include “IQmathLib.h“         
#include “DSP28_Device.h“
#include “BLDCM.h“
#include “parameter.h“
#include “build.h“

// Prototype statements for functions found within this file.
interrupt void CurrentLoop(void);
void SpeedLoop(longlong);        
void PositionLoop(longlong);   
interrupt void ad(void);  
int ReadAngle();                 
int C_sector(int);
//
int ceshi[200];
int ceshi_index=0;
//

// Global variables used in this system
float T = 0.001/ISR_FREQUENCY;     // Samping period (sec) see parameter.h
int D_func_desired =0x1000;
unsigned int a1[64];             //LXG AD    
int vm;

unsigned int v[100];//????????
unsigned int v_f[100];
unsigned int i_uf[100];//????????
unsigned int i_f[100];
unsigned int im=0;  //????????  
unsigned int a2=0;  //????????
unsigned int M_angle=0;    //LXG DA2S80A
unsigned int angle_desired = 0;
int inc=1;
char current_flag=1;
int sticker=0;
int pticker=0;
unsigned int volocity=0;
int v_rpm;
unsigned int current =0;
unsigned long v_filter=10;
unsigned long busbar_voltage_filter=1;
unsigned long c_filter=100;
int i;
unsigned int voltage_factor;
unsigned int torque_angle_factor[86]={ 0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF};
unsigned int torque_load_factor[86]={ 0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF
0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF0x7FFF};
int index;


#define N 1
unsigned int value_buf[N];
char ii=0;


PWMGEN

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      11701  2008-06-22 20:32  motor\scr\BLDCM.c

     文件        512  2009-03-19 18:30  motor\scr\commutation.c

     文件       3281  2008-06-23 13:12  motor\scr\DSP28_Adc.c

     文件       3104  2008-06-15 20:19  motor\scr\DSP28_CpuTimers.c

     文件      24570  2006-03-29 08:29  motor\scr\DSP28_DefaultIsr.c

     文件       3416  2008-06-22 22:13  motor\scr\DSP28_GlobalVariableDefs.c

     文件       1667  2008-07-10 17:27  motor\scr\DSP28_Gpio.c

     文件        629  2006-03-29 08:29  motor\scr\DSP28_InitPeripherals.c

     文件       1775  2007-07-23 10:35  motor\scr\DSP28_PieCtrl.c

     文件       5106  2007-07-23 10:36  motor\scr\DSP28_PieVect.c

     文件       2697  2010-01-21 17:21  motor\scr\DSP28_Sci.c

     文件       2047  2008-06-25 12:52  motor\scr\DSP28_SysCtrl.c

     文件       3127  2006-03-29 08:29  motor\scr\DSP28_Xintf.c

     文件       2670  2009-12-31 13:36  motor\scr\f28xbldcpwm.c

     文件       2075  2009-12-26 20:01  motor\scr\f28xqep.c

     文件       9118  2010-03-23 17:50  motor\scr\motor.c

     文件       1952  2007-07-23 10:39  motor\scr\pid_reg.c

     文件       1374  2010-01-19 16:06  motor\scr\pid_reg1.c

     文件       1510  2007-06-08 17:44  motor\scr\pid_reg2.c

     文件       1952  2009-12-26 20:01  motor\scr\speed_fr.c

     文件          7  2008-06-22 22:27  motor\scr\新建 文本文档.txt

     文件     528962  2002-06-22 02:32  motor\lib\IQmath.lib

     文件     170798  2006-03-29 08:29  motor\lib\rts2800n.lib

     文件       5788  2006-03-29 08:29  motor\include\DSP28_Adc.h

     文件       4517  2006-03-29 08:29  motor\include\DSP28_CpuTimers.h

     文件       4167  2006-03-29 08:29  motor\include\DSP28_DefaultIsr.h

     文件       1757  2006-03-29 08:29  motor\include\DSP28_DevEmu.h

     文件       3249  2008-06-22 20:55  motor\include\DSP28_Device.h

     文件      46057  2006-03-29 08:29  motor\include\DSP28_ECan.h

     文件      20595  2007-07-23 10:54  motor\include\DSP28_Ev.h

............此处省略91个文件信息

评论

共有 条评论