main.h

来自「本程序为ad的dsp21990控制芯片程序,其功能是通过传统的PI控制算法来实现」· C头文件 代码 · 共 57 行

H
57
字号
/*********************************************************************************************
*											    *
* Application: PI control		    *
*											    *
* File: Main.h										    *
*											    *
* Description: system include file							    *
* Purpose    : define system parameters, include all necessary library routines		    *
* 											    *
* Author     : JC									    *
* Version    : 1.0	
* Date		 : Dec, 2001
* Modification History:    none								    *
*											    *
* Embedded Control Systems								    *
* Analog Devices Inc.									    *
*********************************************************************************************/

#ifndef MAIN_INCLUDED
#define MAIN_INCLUDED

/**********************************************************************************************
* General System Parameters and Constants						     *
**********************************************************************************************/

#define  Cry_clock         			50000 	// Crystal clock frequency [kHz]
#define  PLL_clock_multiplier       1 		// Multiplier for core clock
#define  H_clock_ratio		        2 		// core/H clock ratio

#define  Core_clock  				Cry_clock * PLL_clock_multiplier// do not change
#define  H_clock  				    Core_clock / H_clock_ratio// do not change

#include <adsp-21990.h>;
#include <macro.h>;

/**********************************************************************************************
*	Library :PWM block																		*
*	File: pwm501.dsp																		*
*	Application Note: Usage of the ADMC501 Pulse Width Modulation Block						*/

#define  PWM_freq          10000	//Desired PWM switching frequency [Hz]       
#define  Deadtime          2000		//Desired Deadtime [nsec]        
#define PWM_syncpulse		440		//Desired PWMSYNC pulse time [nsec]	
 
/**********************************************************************************************/


/**********************************************************************************************
*	Library :PI control functions															*
*	File: pi.dsp																		*
																				
//None
**********************************************************************************************/


#endif

⌨️ 快捷键说明

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