DSP外扩AD7656程序


主控芯片为DSP28335,通过XITNF配置及相应的程序实现与AD7656之间的并行通信
资源截图
代码片段和文件信息
// TI File $Revision: /main/5 $
// Checkin $Date: October 23 2007   13:34:09 $
//###########################################################################
//
// FILE: DSP2833x_Adc.c
//
// title: DSP2833x ADC Initialization & Support Functions.
//
//###########################################################################
// $TI Release: DSP2833x/DSP2823x Header Files V1.20 $
// $Release Date: August 1 2008 $
//###########################################################################

#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_RATE 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.
//===========================================================================

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-06-26 15:46  AD7656
     文件         324  2013-08-02 09:32  AD7656.ccsproject
     文件       10713  2013-08-06 14:12  AD7656.cdtbuild
     文件         677  2013-08-02 09:32  AD7656.cdtproject
     目录           0  2017-06-26 15:46  AD7656.launches
     文件        3614  2013-08-04 17:28  AD7656.launchesAD7656.launch
     文件         586  2013-08-02 09:32  AD7656.project
     目录           0  2017-06-26 15:46  AD7656.settings
     文件         637  2013-08-02 09:38  AD7656.settingsorg.eclipse.cdt.managedbuilder.core.prefs
     目录           0  2017-06-26 15:46  AD765628335_AD7656.CS_
     文件        3072  2013-05-23 15:18  AD765628335_AD7656.CS_FILE.CDX
     文件        1492  2013-05-23 15:33  AD765628335_AD7656.CS_FILE.DBF
     文件        2231  2013-05-23 15:18  AD765628335_AD7656.CS_FILE.FPT
     文件      326144  2013-05-23 15:33  AD765628335_AD7656.CS_SYMBOL.CDX
     文件      241128  2013-05-23 15:33  AD765628335_AD7656.CS_SYMBOL.DBF
     文件      413858  2013-05-23 15:33  AD765628335_AD7656.CS_SYMBOL.FPT
     文件      465748  2017-03-09 22:26  AD76569927416AD7656.rar
     目录           0  2017-06-26 15:46  AD7656CMD
     文件        3941  2013-03-06 11:32  AD7656CMD28335_RAM_lnk.cmd
     文件        8438  2013-03-06 11:32  AD7656CMDDSP2833x_Headers_nonBIOS.cmd
     文件        4855  2013-03-06 11:32  AD7656CMDF28335.cmd
     目录           0  2017-06-26 15:46  AD7656Debug
     文件       27224  2013-08-06 15:32  AD7656DebugAD7656.map
     文件      170013  2013-08-06 15:32  AD7656DebugAD7656.out
     目录           0  2017-06-26 15:46  AD7656DebugCMD
     文件           0  2013-08-06 15:31  AD7656DebugCMDccsSrcs.opt
     文件        1036  2013-08-06 15:31  AD7656DebugCMDsubdir.mk
     目录           0  2017-06-26 15:46  AD7656DebugSRC
     文件        1291  2013-08-06 15:31  AD7656DebugSRCDSP2833x_ADC_cal.obj
     文件        1575  2013-08-06 15:31  AD7656DebugSRCDSP2833x_CodeStartBranch.obj
     文件      126109  2013-08-06 15:31  AD7656DebugSRCDSP2833x_CpuTimers.obj
............此处省略72个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)