MP3 DFPlayer Mini and PIC MCU


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    The module does not care if you use Serout or Hserout as long the command syntax is correct.

    So, the answer is yes, you can use it just fine.

    Ioannis

  2. #2
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

    Anyone implemented "query number of files" function?
    I want to add this to alarm clock, as alarm tone storage, so user should get number of files, to properly choose the desired tone.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    I have it running with software serial port, but facing some issues.

    Based on code above:

    Code:
    serout portc.5,t9600, [$7e,$ff,$06,$06,$00,$00,$07,$fe,$ee,$ef]   
    pause 500
    serout portc.5,t9600, [$7e,$ff,$06,$03,$00,$00,$02,$fe,$f6,$ef]
    This works, however, it requires at least 500ms pause between each statements, or they're ignored.
    Is this normal?
    also, I have read the datasheet, but can't understand, which bit, based on which logic I should change in code above, to select another track, or change volume?

    for example, in this code, posted above, which selects #3, #2, #1 songs in a folder, I can clearly see

    Code:
    hserout [$7e,$ff,$06,$03,$00,$00,$03,$fe,$f5,$ef] 
    hserout [$7e,$ff,$06,$03,$00,$00,$02,$fe,$f6,$ef] 
    hserout [$7e,$ff,$06,$03,$00,$00,$01,$fe,$f7,$ef]

    But why there are $F5, $F6, $F7 bytes also changing at the end of the code?

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    Quote Originally Posted by CuriousOne View Post
    I have read the datasheet, but can't understand, which bit, based on which logic I should change in code above, to select another track, or change volume
    Looking at the data sheet page 6, in post #1.

    Play a track 7E FF 06 14 00 10 FF FD D8 EF , without checksum 7E FF 06 14 00 10 FF EF 10 FF = folder 1 track 255, The upper nibble "1" specifies the folder. The lower 3 nibbles are the track number so F1 11 would be folder 15, track 273

    Volume change the 1E byte from 0 to FF to set the valume

    Specify volume 7E FF 06 06 00 00 1E FE D7 EF , without checksum 7E FF 06 06 00 00 1E EF Specified volume is level 30 =0X1E

    But why there are $F5, $F6, $F7 bytes also changing at the end of the code?
    Looking at the data sheet again

    There are to two ways to send a command, one with checksum 10 bytes and the other without checksum 8 bytes.

  5. #5
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    Thanks, to which datasheet you refer to? My module is different, sorry for confusion. I'm using this: https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
    And how to play without any folder at all? i.e. all files are just on the SD card?
    Last edited by CuriousOne; - 27th February 2022 at 18:35.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    See the PDF file in the first post of this thread. It looks like the same module as you have. As far as folders for mp3, I have no knowledge. Maybe you can can use 0?
    Last edited by mark_s; - 27th February 2022 at 19:01.

  7. #7
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: MP3 DFPlayer Mini and PIC MCU

    Thanks! I've sorted it out and using now without checksum and it works fine.
    However, the issue with slow acceptance of statements persists...

Similar Threads

  1. Any 8 pin PIC MCU, that can use MCLR as ADCIN or output?
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 11th December 2016, 19:38
  2. ABS brake Pic code with 16f917 mcu
    By Foodie in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th November 2009, 20:58
  3. interaction between Bluetooth and PIC MCU
    By veenadari in forum Bluetooth
    Replies: 1
    Last Post: - 23rd June 2009, 15:03
  4. Block diagram for PIC based mp3 player
    By joseph Degorio in forum Schematics
    Replies: 13
    Last Post: - 18th December 2007, 16:13
  5. mini speaker
    By Ron Marcus in forum Off Topic
    Replies: 3
    Last Post: - 4th March 2007, 23:43

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts