Welcome!
We thank you for purchasing the AZ-Delivery MP3 DFPlayer module.
In the pages that follow, we will explain how to use and
set up this handy device.
Have fun!
The MP3 DFPlayer Mini module is a small and affordable MP3 player with
a direct output on a speaker or headphones. The module can be
used as a standalone module with a battery, a speaker and
push buttons or used in combination with an Arduino board or
any other card with UART capabilities.
The module supports common audio formats such as MP3, WAV.
and WMA. It supports MicroSD cards with the file system
FAT16 or FAT32. You can play music through a simple port.
series without any complex operation.
The module comes with two pre-soldered 8-pin male connectors.
it has a slot for a MicroSD memory card. There is
also an embedded red LED used to indicate the status of
reading the pieces. The LED is connected to the BUSY pin of the module.
The lit state of the LED indicates that a piece is being played.
Specification:
» Power supply voltage from 3.2V to 5V DC
» Monitoring stream 20mA20mA
» Operating temperature -40℃ to 70℃
» USART Port Standard (TTL Level)
» Speed default 9600bps, adjustable
» Equalizer 6 adjustable modes
» Volume 30 adjustable levels
» Sampling rate (kHz) 8/11.025/12/16/22/24/32/44.1/4848
» Exit 24 bits DAC for 90dB,
SNR for 85dB
» Output power 3W
» High Impedance 3Ω (maximum 8Ω)
» File system FAT16 or FAT32
» Maximum size 32GB on SD card,
32GB on USB memory
64MB bytes NORFLASH
» Types of control Interface I/O
Serial Port
AD Button
» Sound wait functionINFOS(music can be
suspended, when INFO is finished the music continues to
to play
» Audio data sorted by folders. The module supports
up to 100 files and each file can contain up to 255
pieces.
Broaching
The USART (UART) pins are used for serial communication.
If you encounter loud noise, connect a 1kΩ resistor to the
brocheTX in series.
The audio output channel pins are used as DAC pins.
(Digital to Analog Converter), and you need to connect them to the amplifier
external.
The speaker pins are amplifier 3W pins
built-in, and you can connect them directly to the speaker
external (8Ω max).
The ADKEY pins are used for the AD control mode.
The pins of the TRIGGER port are used to adjust the levels of
volume or to change track (hardware). These pins are active
LOW.
USB connectors are used for the connection of USB memory.
Power supply and BUSY pin
The module supports a operating voltage range from 3.2V to
5V DC. Connect an external power supply between the power pin.
and the ground pin (GND).
The logic level TTL voltage of the module's serial port is 3.3V.
So when you use 5V levels (for example the Uno board)
connect a resistor of more than 1kΩ in series to the RX pin
module. If you do not use this resistor, you will have a high noise
on the audio output channels.
The read state pin or BUSY is used to indicate the state of
reading a piece. The LOW state on this pin indicates that the module
is reading a piece, and the HIGH state indicates that the module is not reading
no piece.
Audio output channels and speaker pins
The main chip of the module is a digital-to-analog converter.
24 bits (DAC). The chip has two DAC pins that are connected.
directly to the audio output channels of the module. You need to connect
an external amplifier on the audio output channel pins so that
to use the DAC capabilities of the module. If you want to use these pins,
first activate the DAC output by sending the corresponding command to
the flea (further in the text).
A 3W amplification circuit is integrated into the module. The core of this
The circuit is a device called 'audio amplifier 8002', an integrated circuit.
(CI) with 8 pins whose output is connected to the Speaker+ and
The output of the CI 8002 is mono.
Connect the external speaker to the module as indicated on this
connection diagram:
Trigger ports (IO pins)
These pins are used for switching pieces and adjustment.
volume levels via the hardware. Connect push buttons to
these pins as indicated in this diagram:
When the push button is at rest, the diagonal pins of the
push buttons are not connected. When you press on the
push-button, these pins are connected, which activates the button
push button in an active state.
A short press on the push button IO2 allows you to read the piece
Next. A long press on the push button increases the
volume level.
A short press on the push button IO1 allows you to read the piece.
previous. A long press on the push button decreases the
volume level.
The duration of the long thrust is more than one second. Everything that
is less than a second is considered a short push.
ADKEY Brooches
The AD feature of the chip embedded in the module allows you to
connect 20 resistors with buttons to two AD ports of the module
as shown in this connection diagram:
NOTE: It is necessary for the power supply to be as stable as possible.
to make it work properly!
A brief press on the Play Mode button switches playback to mode
interrupted or uninterrupted. This means that the reading will be or will not be
interrupted by aINFO. There is no long press function
for this button.
A brief press on the button U/TF/SPI switches the device to
reading one of the following elements: U = USB flash drive, TF = SD card
SPI = NORFLASH or Sleep. There is no long press function.
for this button.
A brief press on the Loop All button switches from mode to
looping playback of a piece to looping playback of all pieces
or not to read them in a loop. There is no long press function.
for this button.
A brief press on the Pause/Play button pauses or plays the
selected piece. There is no long press function for this.
button.
A short press on the Pre/Vol+ button allows you to skip to the track
previous. A long press on the Pre/Vol+ button increases the level
of the volume.
A short press on the Next/Volume button allows you to skip to the track.
Next. A long press on the Pre/Vol+ button decreases the level of
volume.
A short press on the buttonSegment1 allows you to play the piece
number 1. A long press on the buttonSegment1repeats the playback
from the same song.
The functions are the same for all other Segment buttons, except for
for the song number that differs.
Serial Port
The RX and TX pins are used to establish a serial communication.
with an external microcontroller. Don't forget to connect a resistor
to the skewer when you use a 5V TTL logic. The serial port of
module supports asynchronous serial communication mode. The speed in
The default baud rate for serial communication is 9600bps and it is
software adjustable.
You can use the serial port to send simple commands to
module and thus control many functions supported by the
module. You will learn more about the commands in the next chapter.
Specifications
Baud rate 9600bps
Data bit 1
Checkout no
Flow control no
Command format
To send a command to the module, follow the specific format:
$SB VB LB CMD ACK DATA1 DATA2 CHKS1 CHKS2 $EB
Name Octet Byte description
$SB 0x7E Start byte
VB 0xFFVersion octet
LB The number of bytes of the command without
start and end octets (In our case, 0x06)
CMD 0xxxLike PLAY, PAUSE, etc.
ACK 0xxxACK0x00= NON,0x01= OUI
DATA1 0xxx High data octet
DATA2 0xxxLow data octet
CHKS1 0xxx Octet HIGH of the checksum
CHKS2 0xxxOctet Base of the checksum
$EB 0xEF End octet
The ACK byte is used to obtain data from the module. If it is set to
0x00, no data will be sent by the module and if it is set to
0x01, you will receive response data from the module. The length of the
data is not limited, but it is generally two bytes
(octetsdata1anddata2).
To send a specific command, just send a byte by
octet in series on the serial interface of the software (you can see this further on)
in the code).
Folder structure and song titles
The module supports multiple types of files and names.
specific to the pieces. The names of the folders are numbers, to
the exception of the "mp3" and "ADVERT" folders. The names of the tracks
must start with a number followed by the string of
characters without spaces. Example of piece name:
0001_Linking_Park_In_The_End.mp3
There are five types of files:
The first can contain 256 pieces. The module supports 256 of
these files in total. The names of these files are numbers included
between 000 and 255. The names of the pieces in these folders start
by numbers between 000 and 255. The module does not take into account
load the subfolders.
The second can hold 3000 pieces. The module supports 16 of
these folders in total. The names of these folders are numbers included
between 00 and 15. The names of the pieces in these folders start with
numbers between 0000 and 2999. The module does not take into account
load the subfolders.
The third is called 'mp3' and it can also contain 3000 tracks.
The module supports a single 'mp3' folder in total. The names of the
pieces in this folder start with numbers between
0000 and 2999. The module does not support subfolders.
The fourth is called "ADVERT", which can also contain 3000.
pieces and which is used for INFO. The module supports a single
folder "ADVERT" in total. The file names in this folder
starting with numbers between 0000 and 2999. The module does not
does not support subfolders.
Finally, the fifth is the root folder 'root'. If it is the only folder of
the SD card or USB stick (no other folder), this folder can contain
up to 65,536 pieces. This folder can have subfolders, y
includes all types of files. The 'root' folder can contain
songs and subfolders at the same time.
Folder structure example:
root
---0001r.mp3
---0002r.mp3
---0003r.mp3
---0004r.mp3
---0001
--- ---0001x.mp3
--- ---0002x.mp3
---0002
--- ---0001y.mp3
---mp3
--- ---0001m.mp3
--- ---0002m.mp3
--- ---0003m.mp3
---ADVERT
--- ---0001a.mp3
--- ---0002a.mp3
Sending commands to the module
In order to send commands to the module, connect the module with
the Arduino Uno as indicated in the connection diagram below:
Module > One
VCC > 5V Red
RX > D7 (through a 1kΩ resistor) Blue
TX > D6 Green
GND > GND Black
Module > Speaker
SPK - > Brooch - from the speaker Violet
SPK+ > Brooch + speaker Violet
NOTE: You can use any other card with a
microcontroller that has UART capabilities.
We use the serial software interface on digital I/O pins 6
and 7 of the Uno, because the Uno uses the hardware serial pins (I/O pins
digits 0 and 1), for the programming of the main microcontroller.
The microcontroller cannot send commands to control the
module while the module initialization is not finished and that the
Status information is not returned. Otherwise the orders
messages sent by the microcontroller will be ignored and this will affect the
initialization process.
If not stated otherwise (by sending a command after
initialization), when the module is powered on, it first reads the card
SD and if it is not available, it switches to the USB memory.
Code example
#include "SoftwareSerial.h"
#defineStart_Byte 0x7E
#define Version_Byte 0xFF
#define Command_Length 0x06
#define End_Byte 0xEF
// Returns info with command 0x41 [0x01: info, 0x00: no info]
#define Acknowledge 0x01
SoftwareSerial mySerial(6, 7);// RX, TX
byte receive_buffer[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
char data;// Used for received commands from Serial Monitor
byte volume = 0x00;// Used to store current volume level
bool mute_state = false; // Used to toggle mute state
Execute the command and parameters
void execute_CMD(byte Command, byte Data1, byte Data2) {
// Calculate the checksum (2 bytes)
word Checksum = -( Version_Byte + Command_Length + Command +
Acknowledge + Data1 + Data2);
// Build the command
byte command_line[10] = { Start_Byte, Version_Byte,
Command_Length, Command, Acknowledge,
Data1, Data2, highByte(Checksum),
lowByte(Checksum), End_Byte;
Send the command line to the module
for(byte k = 0; k < 10; k++) {
[Link](command_line[k]);
}
}
void reset_rec_buf() {
for(uint8_t i = 0; i < 10; i++) {
receive_buffer[i] = 0;
}
}
bool receive() {
reset_rec_buf();
if([Link]() < 10) {
return false
}
for(uint8_t i = 0; i < 10; i++) {
short b = [Link]();
if(b == -1) {
return false
}
receive_buffer[i] = b;
}
When you reset the module in software,
The received buffer elements are shifted.
To correct that we do the following:
short b = receive_buffer[0];
for(uint8_t i = 0; i < 10; i++) {
if(i == 9) {
receive_buffer[i] = b;
}
else {
receive_buffer[i] = receive_buffer[i+1];
}
} // End correcting receive_buffer
return true
}
void print_received(bool print_it) {
if(print_it) {
if(receive()) {
for(uint8_t i = 0; i < 10; i++) {
[Link](receive_buffer[i],HEX);[Link]("\t");
}
[Link]();
}
}
else { receive(); }
}
void module_init() {
execute_CMD(0x0C, 0, 0); delay(1000);// Reset the module
print_received(false);delay(100);
SDON
print_received(true);delay(100);
playFirst();
setVolume(0x09);
}
void play_first() {
PLYFST
execute_CMD(0x03, 0, 1); delay(100); Play first song
print_received(false);delay(100);
execute_CMD(0x45, 0, 0); delay(100);// Get playback status
print_received(false);delay(100);
print_received(true);delay(100);
}
void set_volume(uint8_t volume) {
SETVOL
execute_CMD(0x06, 0, volume); delay(100);// Set volume level
print_received(false);delay(100);
execute_CMD(0x43, 0, 0); delay(100);// Get volume level
print_received(false);delay(100);
print_received(true);delay(100);
}
void play_next() {
[Link]("NEXT ");
execute_CMD(0x01, 0, 0); delay(100);
print_received(false);delay(100);
execute_CMD(0x4C, 0, 0); delay(100);// Get current song played
print_received(false);delay(100);
print_received(true);delay(100);
}
void mute() {
mute_state = !mute_state;
if(mute_state) {
execute_CMD(0x43, 0, 0); delay(100);// Return volume level
print_received(false);delay(100);
print_received(false);delay(100);
volume = receive_buffer[6];
[Link]("MUTE\t");
execute_CMD(0x06, 0, 0x00); delay(100);// Set volume level
print_received(false);delay(100);
execute_CMD(0x43, 0, 0); delay(100);// Get volume level
print_received(false);delay(100);
print_received(true);delay(100);
}
one tab
else {
VOL
execute_CMD(0x06, 0, volume); delay(100);// Set previous vol
print_received(false);delay(100);
execute_CMD(0x43, 0, 0); delay(100);// Get volume level
print_received(false); delay(100);
print_received(true);delay(100);
}
}
void random_play() {
Random plays all songs, loops all, repeats songs in playback
execute_CMD(0x18, 0, 0);
delay(100);
[Link]("RNDM\t");
print_received(false);
delay(100);
execute_CMD(0x4C, 0, 0); // Get current song played
delay(100);
print_received(false);
delay(100);
print_received(true);
delay(100);
}
void query_status() {
execute_CMD(0x42, 0, 0); delay(100);// Get status of module
print_received(false); delay(100);
[Link]("STATUS\t");
print_received(true);delay(100);
execute_CMD(0x43, 0, 0); delay(100);// Get volume level
print_received(false);delay(100);
VOLUME
print_received(true);delay(100);
execute_CMD(0x44, 0, 0); delay(100);// Get EQ status
print_received(false);delay(100);
[Link]("EQ\t");
print_received(true);delay(100);
execute_CMD(0x45, 0, 0); delay(100);// Get playback status
print_received(false);delay(100);
PLYBCK
print_received(true);delay(100);
execute_CMD(0x46, 0, 0); delay(100);// Get software version
print_received(false);delay(100);
[Link]("SFVER\t");
print_received(true);delay(100);
Get total number of files on storage device
execute_CMD(0x48, 0, 0); delay(100);
print_received(false); delay(100);
FILES
print_received(true);delay(100);
execute_CMD(0x4C, 0, 0); delay(100);// Get current song played
print_received(false);delay(100);
[Link]("CRRTRK\t");
print_received(true);delay(100);
}
void setup() {
[Link](115200);
[Link](9600); delay(1000);
Initialization
module_init();
}
void loop() {
print_received(true);
while([Link]() > 0) {
data = [Link]();
// [Link](data, HEX); // For debugging
if(data !="/n") {
if(data == 'N') {
Play next song
play_next();
}
else if(data =='B') {
Random play
random_play();
}
// .....
else if(data =='D') {
Query status of the module
query_status();
}
}
}
delay(100);
}
The code begins by including a library called
SoftwareSerial.h
Then, we define five macros. These macros represent the bytes.
of orders that are the same for all orders. The first
the octet is called 'Start_Byte' whose value is 0x7E, the second octet is
called 'Version_Byte' whose value is 0xFF, the third byte is
called 'Command_Length' whose value is 0x06, the fourth byte is
called 'End_Byte' whose value is 0xEF and the fifth byte is called
Acknowledge with the value 0x01.
Then, we define the software serial object called 'mySerial' with this
line of code: SoftwareSerial mySerial(6, 7);
Where does the digital I/O pin of the Uno represent the RX pin?
the module is connected and represents the digital I/O pin of the Uno
to which the module's TX pin is connected.
Then, we create an array called 'receive_buffer', which has ten
elements. The elements of the "receive_buffer" array represent the bytes
who are sent by the module and received by the Uno.
After that, we create three variables. The first one is called 'data' and
it is used to store orders when we send them
from the serial monitor. The second variable is called 'volume' and it
is used to store the current volume level when we send
the command 'Mute'. The third variable is called 'mute_state' and it
is used to toggle the mute state of the module.
Then, we create several functions. The first function is called
"execute_CMD()" which accepts three arguments and returns no value.
The function execute_CMD() is used to send commands to the
module. The first argument is the command byte, the second is
the data byte 1 and the third is the data byte 2 of the
command. At the beginning of the function execute_CMD() we calculate the
octets checksum with this line of code:
word checksum = -(Version_Byte + Command_Length + CMD +
Acknowledge + Par1 + Par2);
Then, we create an array of orders, called 'command_line'.
This table contains ten elements, which represent ten bytes of the
command :Start_Byte,Version_Byte,Command_Length,Command,
Acknowledge, Data1 Data2, highByte(Checksum),
lowByte(Checksum), etEnd_Byte. At the end of the function execute_CMD(),
we use the for loop to send the ten bytes, one by one, to
module through the serial software.
The following function is called 'reset_rec_buf()' and it is used to
reset all values of the elements of degree_buffer, or for
reset the buffer. The function reset_rec_buf() does not accept any
argument and does not return any value.
We then create a function called “receive()”, which is used to
receive bytes from the module and store them in the array
receive_buffer. The function receive() accepts no arguments and returns
a boolean value. At the beginning of the function receive(), we call
reset_rec_buf() to reset the receive_buffer array.
Next, we check if there is any data on the software serial port and if these
data is ten bytes.
If the return data is ten bytes long, we use the for loop.
to read the ten bytes. After reading a byte, we check if its value
is valid by checking if it is different from "-1". If it is different, we
stocks its value in the reception buffer. If any of the controls is not
not satisfied, the boolean value returned is 'false' otherwise, this value
is 'true'. When we reset the module in the software, the
buffer elements are shifted, so we need to correct that.
We are making the correction with the following code:
short b = receive_buffer[0];
for(uint8_t i = 0; i < 10; i++) {
if(i == 9) {
receive_buffer[i] = b;
}
else {
receive_buffer[i] = receive_buffer[i+1];
}
}
After that, we create a function called 'print_received()' which is
used to display the data received on the serial monitor. The function
print_received() accepts an argument, a boolean value that is
used to determine whether the data should be printed or not. If the
the value of the argument is equal to "true", we call the function receive()
and display the data from degree_buffer. If the value of the argument is
equal to "false", we only call the function receive() without
display the data.
After these functions, we create several other functions that use the
previous functions. All these new functions are explicit.
In the setup() function, we start the hardware serial port with a
transmission speed of 115,200 bps, and the software serial port with a
transmission speed of 9,600 bps (which is the transmission speed by
fault of the module). Then, we call the function module_init() which
initialize the module, set the equalizer, the volume level, play the first one
piece on the storage device and displays the status data on the
serial monitor.
In the loop() function, we wait for data on the serial port. These
data is sent by the serial monitor when we send a
command. The data is one of the following letters: N, B, D and
several other letters. We check which letter is sent and then
we call the corresponding function.
The code of the sketch in this eBook is just an example. If you want to see
the complete sketch, visit the repository at the following linkGitHub:
[Link]
When you download the complete example of the sketch on the Arduino Uno
Start the Serial Monitor and send some commands to the Arduino.
The output should look like the image below:
Examples of commands
Command Bytes (HEX) Description
Next piece 7E FF 060100 00 00 EF Read the following piece
Previous piece 7E FF 060200 00 00 EF Read the previous piece
7E FF 06030000 01EF Read the first piece
Reading with index
7E FF 06030000 02EF Read the second piece
Volume plus 7E FF 060400 00 00 EF Raise the volume of a level
Volume less 7E FF 060500 00 00 EF Lower the volume by one level
Volume 7E FF 06060000 1EEF Set the volume to 30 (=0x1E)
Set the equalizer to 02 - Rock
Equalizer mode 7E FF 060700 0002EF 00 / 01 / 02 / 03 / 04 / 05
Normal/Pop/Rock/Jazz/Classic/Base
Looped piece 7E FF 06080000 01EF Loop the track 0001
7E FF 060900 0001EF USB memory selection
Choice of media
7E FF 060900 0002EF Select SDcard memory
Watch 7E FF 060A00 00 00 EF Watch
Wake-up 7E FF 060B00 00 00 EF Activation
Reset 7E FF 060C00 00 00 EF Reset
Lecture 7E FF 060D00 00 00 EF Resume reading
Pause 7E FF 060E00 00 00 EF Reading paused
Reading a piece in a Play the piece
7E FF 060F0001 01EF
file that can contain 256 01/0001xxx.mp3
pieces; the module can
contain 256 files (0 - 255) Play the piece
7E FF 060F0001 02EF
with 255 pieces. 01/0002xxx.mp3
7E FF 06100001 0AEF 01 – Ampli ON; 0A – niveau (0-31)
Amplifier
7E FF 06100000 00EF 00 - Amplifier OFF
7E FF 061100 0001EF Read everything in a loop
Total loop
7E FF 061100 0000EF Stop the looping playback
Read 0001 in the mp3 folder
Lecture file mp3 7E FF 06120000 01EF
(0x0001 – 0x0BB8; 3000 pieces)
Read 0001 in the ADVERT folder
Lecture file ADVERT 7E FF 06130000 01EF
(0x0001 – 0x0BB8; 3000 pieces)
Command octets without the two checksum bytes
Order Bytes (HEX) * Description
Reading a piece in a 7E FF 06140000 01EF File 0 piece 001
file container 3000
7E FF 06140091 11EF File 9 piece 273 (=0x111)
pieces; the module supports
16 files (0-15) with 3000
7E FF 061400F0 05EF File 15 (=0xF) piece 005
songs.
Stop reading INFO and return to reading
Stop reading INFO 7E FF 061500 00 00 EF
previous
Active playback in total loop since the
Activate total loop 7E FF 061600 0001EF
piece 001
Stop reading 7E FF 061600 0000EF Stop the reading
Loop piece in a
file that can contain 256 7E FF 06170001 02EF Loop piece 02 Folder 01
songs
Random lecture 7E FF 061800 00 00 EF Random play of all the tracks
7E FF 061900 0000EF Choice of starting piece loop
Simple loop choice
7E FF 061900 0001EF Choice piece end of loop
7E FF 061A00 0000EF Active sortie DAC
DAC
7E FF 061A00 0001EF Stop DAC output
Volume at 30 (0x1E is 30) reading
7E FF 0622001E 01EF
piece 01
Read piece with volume
Volume at 15 (0x0F is 15) reading
7E FF 0622000F 02EF
piece 02
Command octets without the two checksum octets
Module status update
There is an option if you want to get the return data from the module.
This data is very useful, as it can contain information.
on the current state of reading, the volume level, the equalization option,
end of the currently playing track, etc. To enable this option, you
you must set the ACK byte of the command to the value 0x01 (0x00 no
return data.
When you send a command with Acknowledge set to 0x01,
The data is coming back. Here is the list of commands to send to the module.
in order to obtain status updates:
Command (HEX) * Description
7E FF 063F00 00 00 EF To obtain the current storage device
7E FF 064000 0001EF Return data indicating the error, where 01 is the error value.
Return data without error. This indicates that the command has been
7E FF 06410000 00EF
Received and executed successfully, where is the status of the module.
7E FF 064200 00 00 EF To obtain the status of the reading
7E FF 064300 00 00 EF To obtain the current volume level
7E FF 064400 00 00 EF To obtain the current state of the equalizer
7E FF 064700 00 00 EF To obtain the total number of files on the USB flash drive
7E FF 064800 00 00 EF To obtain the total number of files on the SD card
7E FF 064B00 00 00 EF To get the current track number on the USB flash drive
7E FF 064C00 00 00 EF To get the current track number on the SD card
7E FF 064E00 00 00 EF To obtain the total number of files on a storage medium
7E FF 064E00 0002EF To get the total number of files in folder 02
7E FF 064E00 000CEF To obtain the total number of files in folder 12
7E FF 064F00 00 00 EF To obtain the total number of files on a storage device
Command octets without the two checksum bytes
Returned values
The return data is in the format
0x7E 0xFF 0x060x41 0x00A B checksum1 checksum0 0xEF
The value 0x41 indicates that a command has been received by the module and
executed successfully.
The value 'A' represents storage media, where
A = 0x01 USB Memory
A = 0x02 SDcard
The value 'B' indicates the state of the reading, where
B = 0x00 indicates that the reading is stopped
B = 0x01 indicates that the reading is in progress
B = 0x02 indicates that the reading is on pause
Example of returned data:
0x7E 0xFF 0x060x41 0x000x02 0x01 0xFE 0xF7 0xEF
where
0x02 the storage device is an SD card
0x01 the reading is in progress
Errors
If an error occurs, the return data will be in the format:
0x7E 0xFF 0x060x40 0x00 0x00 0x01 chks1 chks0 0xEF
Where
0x40 indicates that an error has occurred and 0x01 is the value of the error.
The error values with their description are listed in the table below.
below:
Value Error (HEX) * Description
The module is busy
7E FF 064000 0002EF The module is in sleep mode
7E FF 064000 0003EF Serial reception error
7E FF 064000 0004EF Checksum error incorrect
The specified piece is inaccessible
The specified piece is not found
7E FF 064000 0007EF INFO interleaving error
7E FF 064000 0008EF SDcard reading error
The module has entered sleep mode
Error octets without the two checksum octets
Specific data returned
If the ACK byte is set to 0x01, the module will emit data when the
the piece will be finished when the SD card (or USB flash drive) is
inserted or removed or when the storage device is online. These
Values will be returned without sending a command to the module.
Les données retournées du dispositif de stockage lorsqu’il est inséré
0x7E 0xFF 0x060x3A 0x00 0x00 A 0xFE 0xF7 0xEF
where
: indicates that the storage device is inserted
The data returned from the storage device when it was released
0x7E 0xFF 0x060x3B0x00 0x00A0xFE 0xF7 0xEF
where
0x3B indicates that the storage device is ejected
A = 0x01 indicates that the storage device is a USB memory.
A = 0x02 indicates that the storage device is an SD card.
A =0x04 indicates whether the USB cable is connected or not
The returned data from the completed piece is in the following format
0x7E 0xFF 0x060x3D 0x000x00 0x05 0xFE 0xF7 0xEF
where
0x3D indicates that the piece is finished on the SD card (0x3C = USB),
0x00 0x05 indicate the piece "0005"
The data returned when the storage device is online
0x7E 0xFF 0x060x3F 0x00 0x00 A 0xFE 0xF7 0xEF
where
0x3F indicates that the storage device is online, and 'A' can have
several different values :
A = 0x01 indicates a USB memory
A =0x02 indicates an SD card
A = 0x03 indicates a USB memory and an SD card at the same time.
A = 0x04 indicates a PC connection
Returned values of reading
If the octet ACK is set to 0x01, we send the command for the status.
of reading:
0x7E 0xFF 0x060x45 0x00 0x00 0x00 chks1 chks0 0xEF
The returned data will be in the format:
0x7E 0xFF 0x060x41 0x00 0x00A chks1 chks0 0xEF
where 'A' can have several different values:
A = 0x00 indicates that the reading is set to read and loop
all the pieces of the storage device
A = 0x01 indicates that the reading is set to read and loop.
all the pieces of the specific folder
A =0x02 indicates that the reading is set to read and loop a
piece
A =0x03 indicates that the reading is set to random reading and sets in
loop all the songs from the storage device
A = 0x04 indicates that the reading is set to read a single piece and that
the playback stops when the piece is finished
You succeeded!
You can now use your module to
various projects.
It is now time to learn and create your own projects. You
can you do it with the help of many examples of scripts and others
tutorials that you can find on the Internet.
For microelectronic products Arduino and Raspberry Pi of
Superior quality AZ-Delivery Sales is your contact
privileged. We provide a series of application examples,
complete installation guides, e-books,
libraries and full support.
AZ-Delivery, your microelectronics expert.
[Link]
Have fun!
Legal notices
[Link]