STMicroelectronics AN3277 Application Note Adjustable Buzzer Frequency

This application note describes how to use the STM8S-DISCOVERY touch sensing key and the Beeper peripheral to adjust the frequency of the buzzer. When the STM8S105C6T6 is powered up through a USB cable connected to the host PC, the LED LD1 turns on, indicating that the programming has been successfully completed. Each time the TS1 key is pressed, the Beeper emits a beep at different frequencies (1kHz, 2kHz, and 4kHz). The Beeper stops emitting sound when TS1 is pressed for the fourth time, and it can be restarted by pressing TS1 again.


STMicroelectronics AN3277 Application Note Adjustable Buzzer Frequency - cover page
Brand
STMicroelectronics
Category
Other Electronics
Document type
Application Note
Language
English
Pages
13
File format
PDF
File size
193 KB
Published
06 August, 2012
Updated
29 September, 2023
MD5 checksum
6E5FB5D9402337EFC1DACCB5E23E4770

About this manual

This document explains how to configure the STM8S105C6T6 microcontroller on the STM8S-DISCOVERY evaluation board to create a 3-beep application. The system uses the touch sensing key TS1 to trigger the Beeper peripheral, which outputs sound at increasing frequencies (1 kHz, 2 kHz, and 4 kHz) with each press. After the third press, the beeper stops, and the cycle restarts on the next press. The LED LD1 indicates successful programming at startup.

What's inside

  • Application description
  • Hardware required
  • Application schematics
  • Application principle
  • Option byte configuration
  • Software description
  • Touch sensing library configuration
  • Standard STM8S firmware library configuration
  • Application software flowcharts
  • Revision history

Specifications

Beeper frequency range1 KHz to 4 KHz
Microcontroller modelSTM8S105C6T6
Touch sensing keyTS1
LED indicatorLD1
Beeper output pinPort D4

Frequently asked questions

What happens when the TS1 key is pressed?

Each press triggers the Beeper to emit a beep at a different frequency: 1 KHz, 2 KHz, and 4 KHz respectively.

How many times can the buzzer beep in a cycle?

The buzzer beeps three times in a cycle and stops on the fourth press.

What indicates successful programming?

The LED LD1 switches on when the STM8S105C6T6 is powered up.

Download PDF (193 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →