-
大小: 458KB文件類型: .rar金幣: 2下載: 1 次發布日期: 2021-05-20
- 語言: 其他
- 標簽: TMS320F28027??串口??中斷??
資源簡介
TMS320F28027自帶有串口,利用串口中斷與上位機(電腦)進行數據交換,軟件設置成 上位機所發數據要以‘*’結束。
僅供DSP板的學習所用,軟件用的是CCS4.1,編譯如果不能通過,就把工程存放目錄名中的漢字去掉!

代碼片段和文件信息
?????????????????????????????????????????????????????????????????????????????//?TI?File?$Revision:?/main/5?$
//?Checkin?$Date:?December?16?2009???16:43:59?$
//###########################################################################
//
//?FILE:????DSP2802x_Adc.c
//
//?title:???DSP2802x?ADC?Initialization?&?Support?Functions.
//
//###########################################################################
//?$TI?Release:?2802x?C/C++?Header?Files?V1.25?$
//?$Release?Date:?December?18?2009?$
//###########################################################################
#include?“DSP2802x_Device.h“?????//?DSP2802x?Headerfile?Include?File
#include?“DSP2802x_Examples.h“???//?DSP2802x?Examples?Include?File
#define?ADC_usDELAY??1000L
//---------------------------------------------------------------------------
//?InitAdc:
//---------------------------------------------------------------------------
//?This?function?initializes?ADC?to?a?known?state.
//
//?NOTE:?ADC?INIT?IS?DIFFERENT?ON?2802x?DEVICES?COMPARED?TO?OTHER?28X?DEVICES
//
void?InitAdc(void)
{
????extern?void?DSP28x_usDelay(Uint32?Count);
????//?*IMPORTANT*
????//?The?Device_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;
????????(*Device_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_RATE?define?statement?in?the?DSP2802x_Examples.h?file?must
????//?contain?the?correct?CPU?clock?period?in?nanoseconds.
????EALLOW;
????AdcRegs.ADCCTL1.bit.ADCBGPWD??=?1;??????//?Power?ADC?BG
????AdcRegs.ADCCTL1.bit.ADCREFPWD?=?1;??????//?Power?reference
????AdcRegs.ADCCTL1.bit.ADCPWDN???=?1;??????//?Power?ADC
????AdcRegs.ADCCTL1.bit.ADCENABLE?=?1;??????//?Enable?ADC
????AdcRegs.ADCCTL1.bit.ADCREFSEL?=?0;??????//?Select?interal?BG
????EDIS;
????DELAY_US(ADC_usDELAY);?????????//?Delay?before?converting?ADC?channels
}
void?InitAdcAio()
{
???EALLOW;
/*?Configure?ADC?pins?using?AIO?regs*/
//?This?specifies?which?of?the?possible?AIO?pins?will?be?Analog?input?pins.
//?NOTE:?AIO1357-9111315?are?analog?inputs?in?all?AIOMUX1?configurations.
//?Comment?out?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5975??2013-08-15?12:45??DSP\DSP2802x_common\cmd\280200_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28020_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28021_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28022_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28023_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28026_RAM_lnk.cmd
?????文件???????6387??2013-08-15?12:45??DSP\DSP2802x_common\cmd\28027_RAM_lnk.cmd
?????文件???????8195??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28020.cmd
?????文件???????7848??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F280200.cmd
?????文件???????8191??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28021.cmd
?????文件???????8197??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28022.cmd
?????文件???????8193??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28023.cmd
?????文件???????8196??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28026.cmd
?????文件???????8204??2013-08-15?12:45??DSP\DSP2802x_common\cmd\F28027.cmd
?????文件??????19178??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28020.gel
?????文件??????19177??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f280200.gel
?????文件??????19174??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28021.gel
?????文件??????19176??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28022.gel
?????文件??????19171??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28023.gel
?????文件??????19172??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28026.gel
?????文件??????19176??2013-08-15?12:45??DSP\DSP2802x_common\gel\ccsv4\f28027.gel
?????文件??????60668??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28020.gel
?????文件??????60672??2013-08-15?12:45??DSP\DSP2802x_common\gel\f280200.gel
?????文件??????60668??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28021.gel
?????文件??????61569??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28022.gel
?????文件??????61574??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28023.gel
?????文件??????61731??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28026.gel
?????文件??????61734??2013-08-15?12:45??DSP\DSP2802x_common\gel\f28027.gel
?????文件???????4937??2013-08-15?12:45??DSP\DSP2802x_common\include\DSP2802x_DefaultISR.h
?????文件???????5446??2013-08-15?12:45??DSP\DSP2802x_common\include\DSP2802x_EPwm_defines.h
............此處省略110個文件信息
評論
共有 條評論