資源簡介
三相逆變器SVPWM,DSP F28335開發(fā)板程序,里面加了AD采集,能產(chǎn)生三路正弦信號及正弦波,AD能采集到數(shù)據(jù),數(shù)值穩(wěn)定

代碼片段和文件信息
//?TI?File?$Revision:?/main/4?$
//?Checkin?$Date:?July?30?2007???14:15:53?$
//###########################################################################
//
//?FILE: DSP2833x_Adc.c
//
//?title: DSP2833x?ADC?Initialization?&?Support?Functions.
//
//###########################################################################
//?$TI?Release:?DSP2833x?Header?Files?V1.01?$
//?$Release?Date:?September?26?2007?$
//###########################################################################
#include?“DSP2833x_Device.h“?????//?DSP2833x?Headerfile?Include?File
#include?“DSP2833x_Examples.h“???//?DSP2833x?Examples?Include?File
#define?ADC_usDELAY??5000L
//---------------------------------------------------------------------------
//?InitAdc:
//---------------------------------------------------------------------------
//?This?function?initializes?ADC?to?a?known?state.
//
void?InitAdc(void)
{
????extern?void?DSP28x_usDelay(Uint32?Count);
????//?*IMPORTANT*
//?The?ADC_cal?function?which??copies?the?ADC?calibration?values?from?TI?reserved
//?OTP?into?the?ADCREFSEL?and?ADCOFFTRIM?registers?occurs?automatically?in?the
//?Boot?ROM.?If?the?boot?ROM?code?is?bypassed?during?the?debug?process?the
//?following?function?MUST?be?called?for?the?ADC?to?function?according
//?to?specification.?The?clocks?to?the?ADC?MUST?be?enabled?before?calling?this
//?function.
//?See?the?device?data?manual?and/or?the?ADC?Reference
//?Manual?for?more?information.
????EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK?=?1;
ADC_cal();
EDIS;
????//?To?powerup?the?ADC?the?ADCENCLK?bit?should?be?set?first?to?enable
????//?clocks?followed?by?powering?up?the?bandgap?reference?circuitry?and?ADC?core.
????//?Before?the?first?conversion?is?performed?a?5ms?delay?must?be?observed
//?after?power?up?to?give?all?analog?circuits?time?to?power?up?and?settle
????//?Please?note?that?for?the?delay?function?below?to?operate?correctly?the
//?CPU_CLOCK_SPEED?define?statement?in?the?DSP2833x_Examples.h?file?must
//?contain?the?correct?CPU?clock?period?in?nanoseconds.
????AdcRegs.ADCTRL3.all?=?0x00E0;??//?Power?up?bandgap/reference/ADC?circuits/順序采樣
????DELAY_US(ADC_usDELAY);?????????//?Delay?before?converting?ADC?channels
}
//===========================================================================
//?End?of?file.
//===========================================================================
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????518??2019-07-26?11:19??YJ\.ccsproject
?????文件??????22279??2019-07-26?11:21??YJ\.cproject
?????文件???????4462??2019-07-27?10:39??YJ\.launches\YJ.launch
?????文件????????832??2019-07-26?11:19??YJ\.project
?????文件?????????62??2019-07-26?11:19??YJ\.settings\org.eclipse.cdt.codan.core.prefs
?????文件????????123??2019-07-26?11:19??YJ\.settings\org.eclipse.cdt.debug.core.prefs
?????文件????????208??2019-07-26?11:21??YJ\.settings\org.eclipse.core.resources.prefs
?????文件???????7270??2019-07-26?11:19??YJ\28335_RAM_lnk.cmd
?????文件???????2721??2019-07-27?10:34??YJ\AD.h
?????文件????????395??2019-07-27?11:26??YJ\Debug\ccsObjs.opt
?????文件??????11951??2019-07-27?08:10??YJ\Debug\DSP2833x_Adc.obj
?????文件???????3283??2019-07-27?08:10??YJ\Debug\DSP2833x_Adc.pp
?????文件???????1247??2019-07-26?11:21??YJ\Debug\DSP2833x_ADC_cal.obj
?????文件???????1527??2019-07-26?11:21??YJ\Debug\DSP2833x_CodeStartBranch.obj
?????文件??????28771??2019-07-26?11:21??YJ\Debug\DSP2833x_DefaultIsr.obj
?????文件???????3486??2019-07-26?11:22??YJ\Debug\DSP2833x_DefaultIsr.pp
?????文件??????13410??2019-07-27?09:59??YJ\Debug\DSP2833x_EPwm.obj
?????文件???????3312??2019-07-27?09:59??YJ\Debug\DSP2833x_EPwm.pp
?????文件?????121417??2019-07-26?11:21??YJ\Debug\DSP2833x_GlobalVariableDefs.obj
?????文件???????2719??2019-07-26?11:22??YJ\Debug\DSP2833x_GlobalVariableDefs.pp
?????文件???????5779??2019-07-26?11:22??YJ\Debug\DSP2833x_PieCtrl.obj
?????文件???????3399??2019-07-26?11:22??YJ\Debug\DSP2833x_PieCtrl.pp
?????文件??????17733??2019-07-26?11:22??YJ\Debug\DSP2833x_PieVect.obj
?????文件???????3399??2019-07-26?11:22??YJ\Debug\DSP2833x_PieVect.pp
?????文件??????15913??2019-07-26?11:22??YJ\Debug\DSP2833x_SysCtrl.obj
?????文件???????3399??2019-07-26?11:22??YJ\Debug\DSP2833x_SysCtrl.pp
?????文件???????1256??2019-07-26?11:22??YJ\Debug\DSP2833x_usDelay.obj
?????文件??????15991??2019-07-26?11:22??YJ\Debug\DSP2833x_Xintf.obj
?????文件???????3341??2019-07-26?11:22??YJ\Debug\DSP2833x_Xintf.pp
?????文件??????10333??2019-07-26?11:22??YJ\Debug\Example_EPwmSetup.obj
............此處省略36個文件信息
評論
共有 條評論