|
電路圖
Proteus 52最小系統(tǒng)
代碼:
- #include <reg52.h>
- #define uchar unsigned char
- #define uint unsigned int
- sbit LED=P1^0;
- //延時
- void DelayMS(uint x)
- {
- uchar i;
- while(x--)
- {
- for(i=0;i<120;i++);
- }
- }
- void main()
- {
- while(1)
- {
- LED=~LED;
- DelayMS(150);
- }
- }
復(fù)制代碼
|
|