📄 main.h
字号:
/*********************************************************************************************
* *
* Application: PWM three-phase sinewave generator *
* *
* File: Main.h *
* *
* Description: system include file *
* Purpose : define system parameters, include all necessary library routines *
* *
* Author : JC *
* Version : 1.0
* Date : Feb, 2002
* Modification History: none *
* *
* Embedded Control Systems *
* Analog Devices Inc. *
*********************************************************************************************/
#ifndef MAIN_INCLUDED
#define MAIN_INCLUDED
/**********************************************************************************************
* General System Parameters and Constants *
**********************************************************************************************/
#define Cry_clock 24576 // 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: pwm.dsp *
* Application Note: Usage of the ADMC501 Pulse Width Modulation Block */
#define PWM_freq 20000 //Desired PWM switching frequency [Hz]
#define Deadtime 2000 //Desired Deadtime [nsec]
#define PWM_syncpulse 440 //Desired PWMSYNC pulse time [nsec]
/**********************************************************************************************/
/**********************************************************************************************
* Library :Trigonometric functions *
* File: trigono.dsp *
//None
**********************************************************************************************/
/**********************************************************************************************
* Library :ADC block *
* File: adc.dsp */
#define ADC_Number_of_samples 30 //using the first 30 samples from the ADC to calculate the offset
/**********************************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -