蜂鸣器发声
#include<reg52.h> sbit BUZZER=P3^4; void main(void) { unsigned long int dly=100000; BUZZER=1; while(dly--); BUZZER=0; while(1) { } }
#include<reg52.h> sbit BUZZER=P3^4; void main(void) { unsigned long int dly=100000; BUZZER=1; while(dly--); BUZZER=0; while(1) { } }