buydisplay.com
EastRising
Using the MCU's PWM export, or the ER-TFT028A2-4-5465's PWM export, to push the buzzer or
add a power amplifier or triode to push the horn to play simple music. The audio control
commands only need to transmit via the UART or SPI to the TFT panel, then it will be executed.
It is a fixed command of the host. And these fixed commands are independent of the host
software or programming software.
Table 4-25: Play Audio Control Command
Command
Function
Code
No.
Command Parameter
Command Description
Play Wav
B8h
--
REP(Bit7) + WAV
Play Wav music files via PWM2. WAV :
the number of the Wav file
(0x00~0x7F).
Bit7 is used to control whether to play
in loop. Bit7=0: play once, Bit7 = 1:
loop play
Stop Playing
Wav
B9h
--
Stop playing Wav music file
The audio command does not need to be written in the command file. For example, when the
UART transmits the command B8h, 00 to the TFT panel,, the speaker or buzzer in the TFT panel
will play the music of the first wav file. When the UART transmits commands B8h, 81 to the TFT
panel, the TFT panel will play the music of the second wav file in loop. When the UART
transmits the command B9h to the TFT panel, the TFT panel will stop playing the music
If you want to use other music formats such as MP3, Midi, etc., you can use the music
conversion software to convert on the computer. User can use the graphic compiler
(UartTFT_Tool.exe) to generate Bin files in Wav file, please refer to Section 4.4.5 for details.