资源简介
在2013备战国赛的时候的练习程序,希望能给你提供帮助
代码片段和文件信息
// TI File $Revision: /main/4 $
// Checkin $Date: January 5 2011 17:26:03 $
//###########################################################################
//
// FILE: F2806x_Adc.c
//
// title: F2806x ADC Initialization & Support Functions.
//
//###########################################################################
// $TI Release: 2806x C/C++ Header Files and Peripheral Examples V1.00 $
// $Release Date: January 11 2011 $
//###########################################################################
#include “F2806x_Device.h“ // F2806x Headerfile Include File
#include “F2806x_Examples.h“ // F2806x Examples Include File
#define ADC_usDELAY 1000L
//---------------------------------------------------------------------------
// InitAdc:
//---------------------------------------------------------------------------
// This function initializes ADC to a known state.
//
// NOTE: ADC INIT IS DIFFERENT ON F2806x DEVICES COMPARED TO OTHER 28X DEVICES
//
void Adc_Config(void)
{
//AdcOffsetSelfCal();//校准
// Configure ADC
EALLOW;
AdcRegs.ADCCTL2.bit.ADCNONOVERLAP = 1; // Enable non-overlap mode
AdcRegs.ADCCTL1.bit.INTPULSEPOS = 1; //ADCINT1 trips after AdcResults latch结果锁存到寄存器时触发中断
//AdcRegs.ADCSAMPLEMODE.bit.SIMULEN0 = 1; //Couple SOC0 and SOC1
//AdcRegs.ADCSAMPLEMODE.bit.SIMULEN2 = 1; //Couple SOC2 and SOC3
AdcRegs.INTSEL1N2.bit.INT1E = 1; //Enabled ADCINT1
AdcRegs.INTSEL1N2.bit.INT1CONT = 0; //Disable ADCINT1 Continuous mode
AdcRegs.INTSEL1N2.bit.INT1SEL = 4; // setup EOC4 to trigger ADCINT1 to fire输入电流Ii检测触发中断
AdcRegs.ADCSOC0CTL.bit.CHSEL = 0; // set SOC0 channel select to ADCINA0
AdcRegs.ADCSOC1CTL.bit.CHSEL = 1; // set SOC1 channel select to ADCINA1
AdcRegs.ADCSOC2CTL.bit.CHSEL = 2; // set SOC2 channel select to ADCINA2
AdcRegs.ADCSOC3CTL.bit.CHSEL = 3; // set SOC3 channel select to ADCINA3
AdcRegs.ADCSOC4CTL.bit.CHSEL = 4; // set SOC4 channel select to ADCINA4
AdcRegs.ADCSOC0CTL.bit.TRIGSEL = 9; // set SOC0 start trigger on EPWM3A due to round-robin SOC0 converts first then SOC1
AdcRegs.ADCSOC1CTL.bit.TRIGSEL = 9; // set SOC1 start trigger on EPWM3A due to round-robin SOC1 converts first then SOC2
AdcRegs.ADCSOC2CTL.bit.TRIGSEL = 9; // set SOC2 start trigger on EPWM3A due to round-robin SOC2 converts first then SOC3
AdcRegs.ADCSOC3CTL.bit.TRIGSEL = 9; // set SOC3 start trigger on EPWM3A due to round-robin SOC3 converts first then SOC4
AdcRegs.ADCSOC4CTL.bit.TRIGSEL = 9; // set SOC4 start trigger on EPWM3A
AdcRegs.ADCSOC0CTL.bit.ACQPS = 6; //set SOC0 S/H Window to 7 ADC Clock Cycles (6 ACQPS plus 1)
AdcRegs.ADCSOC1CTL.bit.ACQPS = 6; //set SOC1 S/H Window to 7 ADC Clock Cycles (6 ACQPS plus 1)
AdcRegs.ADCSOC2CTL.bit.ACQPS = 6; //set SOC2 S/H Window to 7 ADC Clock Cycles (6 ACQPS plus 1)
AdcRegs.ADCSOC3CTL.bit.ACQPS = 6; //set SOC3 S/H
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-03-24 18:45 SPWM\
文件 510 2014-03-24 16:53 SPWM\.ccsproject
文件 20313 2014-03-24 16:53 SPWM\.cproject
文件 2569 2014-03-24 16:53 SPWM\.project
目录 0 2014-03-24 18:45 SPWM\.settings\
文件 93 2014-03-24 16:53 SPWM\.settings\org.eclipse.cdt.codan.core.prefs
文件 249 2014-03-24 16:53 SPWM\.settings\org.eclipse.cdt.core.prefs
文件 154 2014-03-24 16:53 SPWM\.settings\org.eclipse.cdt.debug.core.prefs
文件 452 2014-03-24 16:53 SPWM\.settings\org.eclipse.core.resources.prefs
文件 34130 2014-03-24 16:53 SPWM\2806x_BootROM_API_TABLE_Symbols_fpu32.lib
目录 0 2014-03-24 18:45 SPWM\Debug\
文件 672 2014-03-24 16:53 SPWM\Debug\Example_Flash2806x_CsmKeys.obj
文件 42145 2014-03-24 16:53 SPWM\Debug\SPWM.map
文件 919 2014-03-24 16:53 SPWM\Debug\ccsObjs.opt
文件 36 2014-03-24 16:53 SPWM\Debug\ccsSrcs.opt
目录 0 2014-03-24 18:45 SPWM\Debug\cmd\
文件 0 2014-03-24 16:53 SPWM\Debug\cmd\ccsSrcs.opt
文件 289 2014-03-24 16:53 SPWM\Debug\cmd\subdir_rules.mk
文件 380 2014-03-24 16:53 SPWM\Debug\cmd\subdir_vars.mk
文件 5610 2014-03-24 16:53 SPWM\Debug\makefile
文件 319 2014-03-24 16:53 SPWM\Debug\ob
目录 0 2014-03-24 18:45 SPWM\Debug\source\
文件 131615 2014-03-24 16:53 SPWM\Debug\source\F2806x_Adc.obj
文件 3846 2014-03-24 16:53 SPWM\Debug\source\F2806x_Adc.pp
文件 1562 2014-03-24 16:53 SPWM\Debug\source\F2806x_CodeStartBranch.obj
文件 126541 2014-03-24 16:53 SPWM\Debug\source\F2806x_Comp.obj
文件 3877 2014-03-24 16:53 SPWM\Debug\source\F2806x_Comp.pp
文件 126169 2014-03-24 16:53 SPWM\Debug\source\F2806x_CpuTimers.obj
文件 4032 2014-03-24 16:53 SPWM\Debug\source\F2806x_CpuTimers.pp
文件 1191 2014-03-24 16:53 SPWM\Debug\source\F2806x_DBGIER.obj
文件 173467 2014-03-24 16:53 SPWM\Debug\source\F2806x_DefaultIsr.obj
............此处省略126个文件信息
- 上一篇:hyt海能达TR-800中继写频软件
- 下一篇:单片机原理及应用试验全,林立版
相关资源
- SPWM用FPGA产生
- stm32生成互补输出50hzspwm波
- STM32使用tim2 4个通道输出互补SPWM 幅度
- 基于FPGA的spwm产生
- 基于TMS320F28069智能平衡车平衡小车基
- stm32F103-->spwm
- STM32 逆变器程序
- 全桥双极性带死区互补SPWM基于STM32F
- PWM输出_107_单极性SPWM.zip
- 全桥单极性带死区互补SPWM基于STM32F
- SPWM逆变原理及控制方法.pdf
- STM32f103(SPWM)逆变正弦交流50HZ
- 电力电子spwm波仿真
- TIM1_TIM8高级定时器配置互补PWM和SPWM
- 基于stm32的SPWM
- tms320f28069中文数据手册
- SPWM正弦波计算函数
- SPWM变频调速系统设计
- 基于STM32的SPWM输出
- 基于STM32的三相SPWM波输出
- EG8030三相SPWM逆变器资料汇总.rar
- F28335的SPWM产生.rar
- 基于spwm波的步进电机细分技术的stm
- 收集的讲解SPWM的课件各种大学
- STM32F407VET6互补SPWM+死区+PID +ADC+TFT LC
- STM32F103C8T6+SPWM三相六路互补输出+死区
- 基于VerilogHDL的SPWM全数字算法的FPGA实
- STM32F103SPWM
- 正弦波脉宽调制SPWM控制法
- 双极性单相SPWM逆变器滤波电感电流值
评论
共有 条评论