UM0501
Demonstration applications
Doc ID 14320 Rev 3
15/23
2.10 BEEPER
demo
This mode demonstrates the 3 different frequencies that can be output on the BEEP pin.
Prior to running the BEEPER demo, perform the following operations.
●
Install the JP14 jumper in the top position (closer to the STM8S chip).
●
Enable the beep output functionality by setting bit AFR7 of OPT2 option byte to ‘1’
(refer to the datasheets for details).
When this mode is entered, the LSI clock is calibrated.
The message shown in
is displayed at the end of calibration.
Figure 14.
End of calibration message
After a short time, another message shows the current output frequency.
Press the
KEY
button repeatedly to change the frequency in this order.
1 kHz
2 kHz
4 kHz
1-2-4 kHz
OFF
1 kHz etc...
The frequency selected is displayed on the LCD screen (see
)
The LEDs also change depending on the selected frequency.
Figure 15.
Selecting the beep frequency
UP
: Press the joystick
UP
to exit the demo.
KEY
: Press the
KEY
button to change the beeper frequency.
Calibration
OK
BEEPER 1kHz
Press KEY