void reADC() interrupt 2 using 1
{
uchar result;
bit state;
DAT=0xff;
ADdat=DAT;
_Nop();_Nop();
if(ADdat>=DAdat)
{
result=ADdat-DAdat;
state=0;
}
else
{
result=DAdat-ADdat;
state=1;
}
321.C(195): error C202: 'DAT': undefined identifier
321.C(196): error C202: 'ADdat': undefined identifier
都提示你了, 没有定义DAT, ADdat追问
怎么改呀?初学者,不太懂
追答定义成int类型试一试吧,具体在哪定义它,得看你的自己的程序流程是怎么走的,你现在的函数应该是一个外部中断1产生的
追问谢谢,那我都试试吧。
温馨提示:答案为网友推荐,仅供参考