Keil4编译中出现错误是怎么回事呀?

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产生的

追问

谢谢,那我都试试吧。

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网