摘要:
1 //****************************** 2 // 51单片机模拟呼吸灯 3 // 2012.9.23 4 // 5 // p0.0接一个LED灯,状态0为亮 6 //****************************** 7 8 9 #include<reg52.h>10 #define N 2 //亮暗的速率11 #define T 800 //PWM的周期12 13 14 //sbit led0=P0^0;15 //======================16 void pwm(int x)17 {18 whi... 阅读全文