標(biāo)題: 動(dòng)態(tài)數(shù)碼管程序及演示51單片機(jī) [打印本頁(yè)]

作者: ^-^SU    時(shí)間: 2017-12-4 23:07
標(biāo)題: 動(dòng)態(tài)數(shù)碼管程序及演示51單片機(jī)
#include<reg52.h>
#define  LED P1  
typedef unsigned int uint;
typedef unsigned char uchar;
int A[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};

void main()
{
  int i;
  uint j;
  LED=0xff;
  while(1)
  {
          for(i=0;i<10;i++)
          {        LED=A[i];
                for(j=50000;j>0;j--);
              LED=0xff;
          }
  }
}

X7)`(P]M~%TT8N65KD7Y2FM.png (38.43 KB, 下載次數(shù): 26)

X7)`(P]M~%TT8N65KD7Y2FM.png





歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1