-
大小: 479KB文件类型: .rar金币: 2下载: 0 次发布日期: 2021-05-20
- 语言: 其他
- 标签: TMS320F28027 ADC 温度传感
资源简介
利用DSP TMS320F28027的自带温度传感器来检测主芯片的温度,ADC的触发源选为TIMER0,每一秒检测一次,再把结果转成摄氏度和K氏温度。
仅供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个文件信息
- 上一篇:DogServer67
- 下一篇:TMS320F28027 自带串口中断收发数据
相关资源
- 单片机和adc0809数字电压表
- 单片机、ADC0808809设计简易数字电压表
- 单片机与温度传感器DS18B20的程序设计
- 毕业论文之温度传感器DS18B20(源码
- stm32 ds18b20 温度传感器 测试通过
- 数据采集系统——ADC0808的应用,单片
- ADC0809数字电压表 LCD1602显示 汇编程序
- 数字电压表(源程序 protues仿真)
- stm32通过DMA方式采集ADC数据
- broadcom phy BCM5482S datasheet(开发用)
- ADC0808工作时序图
- bcm5482 datasheet
- broadcom 802.11g 网络适配器驱动程序 v
- STM32F103VCT6TR - High-density performance lin
- AT89C51+ADC0808 PROTEUS仿真
- ADC0832ADC0809DAC0832三种芯片程序,c程序
- 数据采集系统——ADC0808的应用
- 基于ROTDR的光纤温度传感时间极限测量
- 基于LM35温度传感器的温控系统设计
- 基于LM35温度传感器的温度检测系统的
- ds18b20温度传感是什么传感器
- 超声处理原位反应合成Al2O3/ADC12复合材
- BM-SOP-T021 BM43系列红外温度传感器的应
- STM32AD采集DA还原
- 以单片机AT89S52、光电脉宽调制器芯片
- ADC0808 数字电压表仿真+C程序
- AppleBluetoothBroadcomInstaller 滚轮
- BMS检测代码-12路-串联
- cs1237手册
- MLX90614红外温度传感器程序,并用液晶
评论
共有 条评论