Alien attack alarm 2
By Sony Sodikin www.sodikinsony.blogspot.com This simple project is same with alien attack alarm 1 project before, but in this project a long-varied tones output is produced longer than project before. Circuit Diagram Program Listing /*********************************************************** Title : Alien attack alarm 2 Author : Sony Sodikin : http://www.sodikinsony.blogspot.com Date : February,2009 Processor : AT89C51 ***********************************************************/ #include #define SPEAKER P1_7 #define ON 0 #define OFF 1 void delay(int z) { unsigned int x; for(x=0;x } main() { int z; for(;;) { for(z=1;z { SPEAKER=ON; delay(z); SPEAKER=OFF; delay(z); } for(z=1000;z>=1;z--) { SPEAKER=ON; delay(z); SPEAKER=OFF; delay(z); ...