Flyron FN-BC04 Скачать руководство пользователя страница 7

www.flyrontech.com

E-mail: [email protected]

Flyron Technology Co., Ltd.

FN-BC04 MP3 Sound Module with 10W Amplifier

7

Format:

$S / Ver. / Number / Command / Feedback / Param_MSB / Param_LSB / Check_MSB / Check_LSB / $O

$S

Start byte 0x7E

Ver.

Version byte, 0xFF by default

Number

Number of bytes from version info to Check_LSB, typically 0x06 (checks um not counted)

Command

Command byte

Feedback

0x01: Need feedback --send confirmation back to MCU; 0x00: No need feedback

Param_MSB

Most significant byte of parameter

Param_LSB

Least significant byte of parameter

Check_MSB

Most significant byte of checksum

Check_LSB

Least significant byte of checksum

$O

End byte 0xEF

For example, if we specify playback of SD card, we need to send the command “7E FF 06 09 00 00 02 FF F0 EF”. The number

is 6 bytes, and these 6 bytes are “FF 06 09 00 00 02”. Start byte, end byte and checksum are not counted.

4.3. About Checksum

Regarding to calculating checksum, you can use the following formula to count.

Checksum (2 bytes) = 0xFFFF–(CMD + Fe Pa Para_LSB) + 1

Normally it’s okay whether users choose to use checksum or not, our module can receive a serial data with or without checksum,

but some of users use a MCU without crystal oscillator, so if in that case we strongly suggest users to add checksum to make sure

the communication stability.

4.4. Serial Communication Commands

4.4.1. Control commands

Command

Function

Note

0x01

Play Next

0x02

Play Previous

0x03

Specify playback of a track

See 4.6.1 for details

0x04

Increase volume

0x05

Decrease volume

0x06

Specify volume

See 4.6.2 for details

0x08

Specify single repeat playback

See 4.6.3 for details

0x09

Specify playback of a device

See 4.6.4 for details

0x0A

Set sleep mode

See 4.6.5 for details

0x0B

Awake from sleep

0x0C

Reset

Содержание FN-BC04

Страница 1: ...es 2 1 3 Technical parameters 2 2 Connections 2 3 Button Control Mode 3 3 1 Trigger Mode Selection 3 3 2 Audio Files Loading 5 4 Serial Control Mode 6 4 1 Naming Rules o Audio Files and Folders 6 4 2 Command Format 6 4 3 About Checksum 7 4 4 Serial Communication Commands 7 4 5 Returned Data from Module 10 4 6 Detailed Annotation of Control Commands 12 4 7 Detailed Annotation of Query Commands 16 4...

Страница 2: ...ays back 4 sounds one on one by negative triggering 6 Uses micro SD card and the built in SPI flash memory for storage devices 7 Built in 4MB SPI flash memory by default and supports max 16MB 8 Supports max 32GB micro SD card 9 Possible to load audio files to the flash memory directly via the micro USB connecting with computer like using a USB flash drive 10 Equipped with a mono 10 watts amplifier...

Страница 3: ...er modes can be set acquired through a configuration file named read cfg which comes from a text file txt originally Users just need to fill in a digit parameter that is corresponding to a trigger mode in a new built text file Save it and rename it read cfg then put it in the root directory of the micro SD card or the flash memory together with the 4 audio files Please refer to the sheet below abo...

Страница 4: ...led Once the button is kept holding when the playback of the audio file is finished it will start to play it repeatedly loop playback Pulse non interruptible one on one playback In this mode a single negative pulse will start playback It s not possible to interrupt the playback by pressing the same button or the other buttons Once an audio file is triggered the audio file will not be able to be in...

Страница 5: ...ut K4 In order to guarantee a correct one on one order please refer to the following steps 1 Build a new folder on the computer and put the 4 audio files in this new folder 2 Rename the audio files from 001 mp3 wav to 004 mp3 wav and make sure they are ranked from 001 mp3 wav to 004 mp3 wav in order 3 Plug in your SD card on computer or connect the module with computer through the micro USB make s...

Страница 6: ...ccording to physical sequence when you copy the files from computer to SD card or SPI flash For example when the module receives a command to play the track 0001 mp3 it will play the 1st track you copied from computer probably 0001 mp3 or not maybe it would play 0007 mp3 if it was the first one you copied from computer In order to avoid this problem when you make the copy rename the audio files fi...

Страница 7: ...nd these 6 bytes are FF 06 09 00 00 02 Start byte end byte and checksum are not counted 4 3 About Checksum Regarding to calculating checksum you can use the following formula to count Checksum 2 bytes 0xFFFF CMD Feedback Para_MSB Para_LSB 1 Normally it s okay whether users choose to use checksum or not our module can receive a serial data with or without checksum but some of users use a MCU withou...

Страница 8: ...00 0 A EF Specify playback of the 10th track Increase volume 7E FF 06 04 00 00 00 FE F7 EF 7E FF 06 04 00 00 00 EF Decrease volume 7E FF 06 05 00 00 00 FE F6 EF 7E FF 06 05 00 00 00 EF Specify volume 7E FF 06 06 00 00 1 E FE D7 EF 7E FF 06 06 00 00 1 E EF Specified volume is level 30 Specify single repeat playback in the root directory 7E FF 06 08 00 00 01 FE F2 EF 7E FF 06 08 00 00 01 EF Repeated...

Страница 9: ...8 00 00 00 EF Random playback of the whole device Set repeat playback of current track 7E FF 06 19 00 00 00 FE E2 EF 7E FF 06 19 00 00 00 EF Turn on single repeat playback 7E FF 06 19 00 00 01 FE E1 EF 7E FF 06 19 00 00 01 EF Turn off single repeat playback Specify playback of a track with a specific volume level 7E FF 06 22 00 1 E 01 FE B A EF 7E FF 06 22 00 1 E 01 EF Play 1st track with volume l...

Страница 10: ...eturned Data from Module 4 5 1 Returned data after the module is powered on 1 After the module is powered on normally it needs about no more than 500ms to 1500m s depending on the actual track quantities in the storage device initialization time Once the initialization is done the module returns a data to MCU If it does not return a data after more than the initialization time it means there is an...

Страница 11: ...fully received the command that MCU sent out 0x41 is the returned command by module 2 Users are free to choose this feedback or not It s also fine not to choose this function 4 5 4 Returned data of errors Returned Data of Errors Meaning Description 7E FF 06 40 00 00 01 xx xx EF Module busy this info is returned when the initialization is not done 7E FF 06 40 00 00 02 xx xx EF Currently sleep mode ...

Страница 12: ...the total track quantity is more than 1000 the response speed is a little slower than 100ms 1 For example if set the first track to be played send the command 7E FF 06 03 00 00 01 FE F7 EF 7E Start byte FF Version Information 06 Number of bytes 03 Actual command specify playback of a track 00 0 x01 need feedback 0 x00 no need feedback 00 Most significant byte of the track MSB of Parameter 01 Least...

Страница 13: ...ifying device to the module finishes initialization of file system Please wait for 200ms and then send the specified command to play a track 4 6 5 Set sleep mode awake from sleep and reset Set sleep mode 7E FF 06 0A 00 00 00 FE F1 EF Awake from sleep 7E FF 06 0B 00 0 0 00 FE F0 EF Reset 7E FF 06 0C 00 00 00 FE EF EF 1 After set the module enter into sleep mode there is also other two ways other th...

Страница 14: ...0001 in the folder ADVERT 7E FF 06 13 00 00 01 FE E7 EF Inter cut track 0002 in the folder ADVERT 7E FF 06 13 00 00 02 FE E6 EF Inter cut track 0255 in the folder ADVERT 7E FF 06 13 00 00 FF FD E9 EF Inter cut track 1999 in the folder ADVERT 7E FF 06 13 00 07 CF FE 12 EF Inter cut track 3000 in the folder ADVERT 7E FF 06 13 00 0B B8 FE 25 EF 1 This module supports inter cut advertisements during p...

Страница 15: ...stop until it receives a command to stop 4 6 10 Set random playback Random playback of the whole s to rage de vice 7E FF 06 18 00 00 00 FE E3 EF This command is used to randomly play all of the tracks in the storage device according to physical sequence and no matter if there is a folder or not in the device 4 6 11 Set repeat playback of current track Turn on single repeat playback 7E FF 06 19 00 ...

Страница 16: ...ine means module is connecting with PC via a USB cable 4 7 2 Query current status Query current online storage device 7E FF 06 42 00 00 00 FE B9 EF 1 There are 4 status playing paused playing stopped playing and in sleep that can be queried during the module is decoding Users can query the current status via sending the command as above 0 x42 2 Interpretation of returned data Returned Data Status ...

Страница 17: ...out Delay of Serial Programming 1 After the module is powered on it needs about 500ms to 1500ms depending on the track quantities in the storage device to initialize After that some data related to initialization returns to MCU Users can choose to ignore these data 2 After specifying playback of a device SD card or SPI flash it needs 200ms delay before sending the command to execute the relative o...

Отзывы: