constant.h
来自「无刷直流电机驱动程序」· C头文件 代码 · 共 50 行
H
50 行
/***********************************************************************************
* 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 + =
减小字号Ctrl + -
显示快捷键?