基于DSP 2407的SPWM程序(源代碼)
大小:3KB 人氣: 2012-12-20 需要積分:10
/*? SPWM Software in C */
/* ver1.0? by Elvis.C? */
/* Part1, Main.C*/
/* QQ:11254435*/
/* Email:starf@163.com*/
#include "2407C.h"
#include "math.h"
#include "float.h"
int TEMP=0, TEMP1, TEMP2, TEMP3, TEMP4, TEMP5, TEMP6, ATOD, PI;
float F_MODU, F_MOTOR;
int M_, M_MAX, K_, T_QUA, F_CARR, PMIN, PMAX, N_, KMAX, TIMECOUNT100, LIGHTFLASH,F_SYS, T_COUNT, T_COUNT2;
void inline disable()
{
? asm(" setc INTM");
}
void inline enable()
{
? asm(" CLRC INTM");
}
void sysini()
{
? asm(" SETC SXM");
? asm(" CLRC CNF");
? *SCSR1=0x02FC;
? *WDCR=0x006F;
? *WDKEY=0x5555;
? *WDKEY=0xAAAA;
}
非常好我支持^.^
(18) 66.7%
不好我反對
(9) 33.3%