微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI模拟硬件电路设计 > 有谁知道 PieVectTable.ADCINT=&ad 是什么意思 谢谢了!

有谁知道 PieVectTable.ADCINT=&ad 是什么意思 谢谢了!

时间:10-02 整理:3721RD 点击:


在这个程序中
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.ADCINT=&ad;
EDIS; // This is needed to disable write to EALLOW protected registers

InitAdc();

// Enable INT14 which is connected to CPU-Timer 2:
IER |= M_INT1;
//KickDog();
// Enable global Interrupts and higher priority real-time debug events:

EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
while(AdcRegs.ADC_ST_FLAG.bit.SEQ1_BSY==0)
{

AdcRegs.ADCTRL2.bit.SOC_SEQ1=1;

}

for(;


{
KickDog();
}
}

interrupt void ad(void)
{
IFR=0x0000;
// PieCtrl.PIEIFR1.all = 0;
PieCtrl.PIEACK.all=0xffff;
a2++;
a1[0]=((float)AdcRegs.RESULT0)*3.0/65520.0+adclo;
a1[1]=((float)AdcRegs.RESULT1)*3.0/65520.0+adclo;
a1[2]=((float)AdcRegs.RESULT2)*3.0/65520.0+adclo;
a1[3]=((float)AdcRegs.RESULT3)*3.0/65520.0+adclo;
a1[4]=((float)AdcRegs.RESULT4)*3.0/65520.0+adclo;
a1[5]=((float)AdcRegs.RESULT5)*3.0/65520.0+adclo;
a1[6]=((float)AdcRegs.RESULT6)*3.0/65520.0+adclo;
a1[7]=((float)AdcRegs.RESULT7)*3.0/65520.0+adclo;
a1[8]=((float)AdcRegs.RESULT8)*3.0/65520.0+adclo;
a1[9]=((float)AdcRegs.RESULT9)*3.0/65520.0+adclo;
a1[10]=((float)AdcRegs.RESULT10)*3.0/65520.0+adclo;
a1[11]=((float)AdcRegs.RESULT11)*3.0/65520.0+adclo;
a1[12]=((float)AdcRegs.RESULT12)*3.0/65520.0+adclo;
a1[13]=((float)AdcRegs.RESULT13)*3.0/65520.0+adclo;
a1[14]=((float)AdcRegs.RESULT14)*3.0/65520.0+adclo;
a1[15]=((float)AdcRegs.RESULT15)*3.0/65520.0+adclo;
AdcRegs.ADC_ST_FLAG.bit.INT_SEQ1_CLR=1;
AdcRegs.ADCTRL2.bit.SOC_SEQ1=1;
EINT;

}

有谁知道 PieVectTable.ADCINT=&ad 是什么意思 谢谢了!!

将中断服务子程序ad 的地址和中断向量表里的adc中断关联起来

再问问 这个中断是怎么执行的 谢谢

你好中断程序的设置应该有问题 a1[0]=((float)AdcRegs.RESULT0)*3.0/4095.0+adclo;

tong xue

[ 本贴由 wy123wy123 于 2008-3-27 10:47 AM 最后编辑 ]

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top