新闻中心

EEPW首页>嵌入式系统>设计应用> 单片机数字电压表

单片机数字电压表

作者: 时间:2013-04-03 来源:网络 收藏

{

dispbuf[i]=temp%10;

temp=temp/10;

i++;

}

dispbuf[i]=temp;

ST=1;

ST=0;

}

}

}

void t0(void) interrupt 1 using 0

{

CLK=~CLK;

}

void t1(void) interrupt 3 using 0

{

TH1=(65536-4000)/256;

TL1=(65536-4000)%256;

P1=dispcode[dispbuf[dispcount]];

P2=dispbitcode[dispcount];

if(dispcount==7)

{

P1=P1 | 0x80;

}

dispcount++;

if(dispcount==8)

{

dispcount=0;

}

}


上一页 1 2 3 下一页

评论


相关推荐

技术专区

关闭