⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constant.h

📁 无刷直流电机驱动程序
💻 H
字号:
/***********************************************************************************
*  FILE:CONSTANT.H                                                                 *
*  TMS320LF2407A TEST BED CODE                                                     *
*  ZHEJIANG TIANHUANG TECHNOLOGY INDUSTRIAL CO.,Ltd                                *
*  05/28/2006  Vesion 1.0                                                          *
*  Jzming                                                                          *
***********************************************************************************/

#ifndef  _CONSTANT_H

#define  _CONSTANT_H


#define PWM_FREQ        20000        /* PWM Frequency (Hz) */
#define SYSCLK_FREQ     40000000     /* DSP clock Frequency (Hz) */
#define CPU_INT_FREQ    20000        /* timer ISR frequency(Hz)

/*-------------------------------------------------------------- */
/* current loop algorithm constants                              */
/*-------------------------------------------------------------- */
//#define adc_ia_ref     0x0d
//#define adc_ib_ref     0x10

//#define i_ref_max      250
//#define i_ref_min      -250

#define HALL_STATE_CON    3                   /* three hall state */
#define SPEED_REF_CON            0            /* speed reference */
#define SPEED_COUNTER_CON        20           /* speed adjust time = 50us*20 = 1ms */
#define CUR_COUNTER_CON          1            /* current adjust time = 50us */

/* ================================================================ */
/* 定义速度和电流调节器结构 */
struct _Speed_pid
{
   int test1;                  
};

//struct _Speed_pid  *speed_pid;
/* ------------------------------------------------------ */


struct _Current_pid
{
   int test2;
};

//struct _Current_pid *current_pid;  

#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -