UM0501
Demonstration applications
Doc ID 14320 Rev 3
13/23
2.8 PWM
demo
1
This mode demonstrates the Timer peripheral operating in PWM mode. Make sure that the
JP14 jumper is installed in the bottom position (closer to the LCD).
1.
Entering the melody (see
):
The first LCD line shows the position of the note to enter.
o
= Edit mode, the note is selected by using the
RV1
potentiometer.
x
= Protect mode, the note cannot be changed.
The second LCD line shows the notes to be played with the following convention:
a/A
= LA
b/B
= SI
c/C
= DO
d/D
= RE
e/E
= MI
f/F
= FA
g/G
= SOL
s/S
= silence or pause
A lowercase letter represent a brief note, and an uppercase letter a long note.
To modify a note, press the joystick
LEFT
or
RIGHT
to navigate the notes, and use the
RV1
potentiometer. Then press
SEL
to confirm.
Once all the notes have been defined, enter an end mark to play the melody.
*
= End of notes, the melody is played only once.
8
= End of melody, the melody is played in a loop with varying octaves and note
durations.
Figure 11.
Defining the melody to be played
2.
Playing and saving the melody
●
Press
SEL
on the joystick to play the tune indefinitely.
●
Press the joystick
UP
to stop the melody.
Note:
Keep the joystick pressed
UP
for a short time to allow the action to be taken into account.
●
The second time
UP
is pressed, a message is displayed asking you whether you want
to save the melody or not (see
).
a)
If you press the
KEY
button, the melody is saved in the external EEPROM.
b)
If you press
UP
on the joystick, you exit from the demo without saving the melody.
o
aaaBBBccdEE*