這是我設計的心形流水燈
學習51單片機必要的開發工具是:KEIL C51
這個軟件在開發51單片機程序是非常好的。由于軟件版權問題,此軟件未放在光盤內。附網盤
如果學習STM32必要的開發工具是:KEIL MDK
包含:
1. KEIL編程軟件
2. 開發板驅動
3. 程序燒入軟件
4. 常用輔助開發軟件
0.png (65.73 KB, 下載次數: 47)
下載附件
2017-5-15 16:52 上傳
單片機源程序:
- #include<reg52.h>
- #include<stdio.h>
- void deloy(int n);
- main()
- {int p3[8]={0xfe,0xfc,0xf8,0xf0,0x70,0x30,0x10,0x00};
- int p0[8]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};
- int p1[8]={0x7f,0x7e,0x7c,0x78,0x70,0x60,0x40,0x00};
- int p2[8]={0xfe,0x7e,0x7c,0x3c,0x38,0x18,0x10,0x00};
- int i;
- for(i=0;i<4;i++)
- {
- P3=p3[i];
- deloy(1000);
- }
- deloy(3000);
- for(i=0;i<8;i++)
- {
- P0=p0[i];
- deloy(1000);
- P1=p1[i];
- deloy(1000);
- }
- deloy(3000);
- for(i=0;i<8;i++)
- {
- P2=p2[i];
- deloy(1000);
- }
- deloy(3000);
- for(i=4;i<8;i++)
- {
- P3=p3[i];
- deloy(1000);
- }
- for(;;)
- {
- P0=0x00;
- P1=0x00;
- P2=0xff;
- deloy(1000);
- P0=0x00;
- P1=0xff;
- P2=0xff;
- }
- }
- void deloy(int n)
- {int i,j;
- for(i=0;i<=n;i++)
- for(j=0;j<=120;j++);}
復制代碼 我的空間:https://user.qzone.qq.com/231679 ... 02e4nzBJAujWrPdCJU_
全部資料下載地址:
3--開發工具.rar
(7.25 MB, 下載次數: 18)
2017-5-15 14:49 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|