The buzzer also becomes PWM (pulse width modulation), the basic principle is to control the buzzer by the pulse to open and stop. It is a very effective technology to control analog circuits by using the digital output of the microcontroller, which is widely used in many fields such as measurement, communication, power control and transformation.
So, we have to operate the buzzer, is through the setting of the tout[0] pin, will be set to the TOUT_0 function, by configuring the PWM waveform to achieve the beep.
Kinds
Buzzer is mainly divided into piezoelectric buzzer and electromagnetic buzzer two types.
Piezoelectric buzzer mainly consists of multi-harmonic oscillator, piezoelectric buzzer, impedance matching device and resonance box, shell and so on. Some piezoelectric buzzer housings are also equipped with light-emitting diodes. A multi-harmonic oscillator is composed of transistors or integrated circuits. When the power supply (1.5~15v DC operating voltage), multi-harmonic oscillator, output 1.5~2.5khz audio signal, impedance matching device to promote the sound of piezoelectric buzzer.
The electromagnetic buzzer consists of an oscillator, an electromagnetic coil, a magnet, a vibrating diaphragm and a shell. When the power is switched on, the audio signal current generated by the oscillator passes through the electromagnetic coil, causing the electromagnetic coil to generate a magnetic field. Vibrating diaphragm in the electromagnetic coil and the interaction of magnets, periodic vibration sound.
Android Deep Development 8th chapter essay sentiment