第八章+AT89系列单片机的接口扩展技术.pptVIP

  • 5
  • 0
  • 约1.62万字
  • 约 105页
  • 2019-09-06 发布于广东
  • 举报

第八章+AT89系列单片机的接口扩展技术.ppt

C语言程序: #includereg52.h unsigned char code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; unsigned char dispcount=0; //计数 sbit gewei=P2^0; //各位选通定义 sbit shiwei=P2^1; //十位选通定义 void Delay(unsigned int tc) //延时程序 { while(tc!=0) { unsigned int i; for(i=0;i100;i++); tc--; } } void LED(unsigned char x ) //led显示函数 { if(x=10) //显示两位数 {shiwei=0; P0=table[x/10]; //显示十位数 Delay(10); shiwei=1; gewei=0; P0=table[x%10]; // 显示个位数 Delay(10); gew

文档评论(0)

1亿VIP精品文档

相关文档