MCU P1.0 output with the audio signal 1KHz and 500Hz-driven alarm sound speaker output for alarm signal to require 1KHz signal ring 100ms, 500Hz signal ring 200ms, alternately, P1.7 then a switch to control, when the switch together on the ring alarm signal, when the switch off warning signals to stop, to compile the program.
單片機(jī)報警器電路圖1
單片機(jī)報警器電路圖2
單片機(jī)報警器電路圖3