基准电压1V,
BUSY于单片机INT0连接,
模拟输入10、9个接49.9K电阻,
输入5V的信号,经过电阻后衰减的就剩下600mv了,
然后利用BUSY在高电平期间单片机T0计数,送计数到1602显示,
请问下我一直显示是0,那里出现毛病了 ?会的帮下,谢了
int0() interrupt 0
{
float a;
uchar A1,A2,A3,A4,A5;
TR0=0;
count=TH0*256+TL0;
a=count;
out=a;
A1=out/10000;
A2=out%10000/1000;
A3=out%1000/100;
A4=out%100/10;
A5=out%10;
chushi();
wi(0x80);
wd(0x30+A1);
wd(0x30+A2);
wd(0x30+A3);
wd(0x30+A4);
wd(0x30+A5);
wd(0x35);
TL0=0;
TH0=0;
} |