1
Development System EasydsPIC6
MikroElektronika
page
13.0. Piezo Buzzer
Due to a built-in piezo buzzer, the develompent system is capable of emitting audio signals. For the piezo buzzer to operate normally
it is necessary to generate a voltage signal of specified frequency. The voltage signal is generated in the microcontroller by the
appropriate code written to its memory. Remember, when writing the voltage signal generation code, that the piezo buzzer’s resonant
frequency is 3.8kHz. In addition, other frequencies in the range between 20Hz and 20kHz can be used, but the best performance is
provided by frequencies ranging between 2kHz and 4kHz. The voltage signal can be generated via microcontroller pin RB12 or RE3,
whereas DIP switch SW9 is used to select which of these two pins is to be used.
Figure 13-2
: Switch 3 on
the DIP switch SW9 is in
ON position, piezo buzzer is
connected to pin RB12
Figure 13-1
: Piezo buzzer
Figure 13-4
: Piezo buzzer and microcontroller connection schematic
Piezo buzzer is connected to the
microcontroller via pin RB12
Figure 13-3
: Switch 4 on
the DIP switch SW9 is in
ON position, piezo buzzer is
connected to pin RE3
Transistor Q10 is used
to
amplify
voltage
signal generated by the
microcontroller