51单片机用程序大全.docVIP

  • 50
  • 0
  • 约1.7万字
  • 约 21页
  • 2018-07-04 发布于浙江
  • 举报
51单片机用程序大全

/********动态显示数码管实验*****/#includereg51.h#define GPIO_DIG P0sbit LSA=P2^2;sbit LSB=P2^3;sbit LSC=P2^4;unsigned char code DIG_CODE[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//0、1、2、3、4、5、6、7、8、9、A、b、C、d、E、F的显示码unsigned char DisplayData[8];//用来存放要显示的8位数的值void DigDisplay(); //动态显示函数/******************************************************************************** 函数名 : main* 函数功能 : 主函数* 输入 : 无* 输出 : 无*******************************************************************************/void main(void){ unsigned char i; for(i=0;i8;i

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档