|
電路圖:
截圖04.png (34.72 KB, 下載次數(shù): 32)
下載附件
流水燈電路圖
2018-3-30 16:00 上傳
代碼:
- #include <reg52.h>
- #include <intrins.h>
- #define uchar unsigned char
- #define uint unsigned int
- //延時(shí)
- void DelayMS(uint x)
- {
- uchar i;
- while(x--)
- {
- for(i=0;i<120;i++);
- }
- }
- void main()
- {
- P0=0xfe;
- while(1)
- {
- P0=_crol_(P0,1);
- DelayMS(150);
- }
- }
復(fù)制代碼
|
|