Home Forums Sparkfun MP3 Shield Library Support Forum Converting Library for Seeed Music Shield

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #1625

    ***Moved from Comments***

    I made the mistake of picking up a Seeed Music Shield in a local shop. I should have waited and ordered a proper one on-line.

    No working code or Docs. So I’m trying to adapt this library.

    I’ve got the SD library working, and I’ve got my pins set up thusly:

    #define MP3_XCS A3
    #define MP3_XDCS A2
    #define MP3_DREQ A1
    #define MP3_RESET A0

    #define SD_SEL 10

    But I can’t figure out how to set up


    So when I try to play track 1 I get maybe the first second or two of audio (maybe repeated twice, not sure)

    Michael, i tried to grab some of your branches where you were looking at Timer1 firing the interrupt, but I couldn’t figure out exactly how that was meant to work. Your comment says Timer1 interupt on pin2, I think?

    Anyway, if anyone has any ideas for adapting this LIB to other boards, I would appreciate it.



    DREQINT is what the decoder uses to signal for more data before the buffer runs empty Since it’s not tied to a external interrupt, the basic library won’t function as is.

    A quick and dirty fix would be just to jumper A1 with D2 (assuming D2 is used by anything on the shield) so that it’s wired to the external interrupt pin. Otherwise Michael can help you with his library branches.



    Did Bill’s suggestion of jumping A1 to D2 WORK? I believe it should work.

    That said it would confirm your pin outs, which initially appears correct. I just don’t have a Seeeduino to try myself.

    I can also provide a cleaner version of the Library integrating either timer method based on a simple #DEFINE statement.


    Hi Michael,

    Thanks for the reply. Sorry it took me so long to check back. I’ve been out and about over the holidays. I went back to Nate’s original SparkFun library and changed the pinouts in that sketch and it works fine. I will come back to the interrupt code from Bill in the next few days and see if I can get it working. Thanks  for taking the time.




    Please try out a current version on my https://github.com/mpflaga/Sparkfun-MP3-Player-Shield-Arduino-Library.git

    I have extracted some hardware configurable parameters to ./SFEMP3ShieldConfig.h file. Where there are some simple defines to select other than default.

    Just un-comment the below defines and select the desired means.

     * Seeduino MP3 Players is supported. However, its DREQ is not connected to a 
     * hard INT(x) pin, hence it MUST be polled. This can be configured below, using
     * USE_MP3_SimpleTimer.
     * When using a Seeeduino MP3 Player shield uncomment the below define of SEEEDUINO
     * Along with USE_MP3_REFILL_MEANS should not be USE_MP3_INTx, unless extra wires.
    //#defined SEEEDUINO  // uncomment if using the Seeeduino Music Shield

    Along with the following:

     * The selection of DREQ and its refilling method.
     * To enable MP3 Player to use OTHER than default INT0 on D2 for refilling 
     * uncomment the below define of USE_MP3_REFILL_MEANS and set to desired method, 
     * described below. 
     * The default when left commented implements INT0 on D2.
     * Configure the implemented means of Refilling the VS10xx chip
    #if defined(USE_MP3_REFILL_MEANS)
    #define USE_MP3_INTx        0 // defacto Interrupt on INTx, from DREQ
    #define USE_MP3_Polled      1 // simply polled from main loop checks DREQ on period.
    #define USE_MP3_Timer1      2 // Interrupt on Timer1, timer IRQ checks DREQ on period.
    #define USE_MP3_SimpleTimer 3 // Soft SimpleTimer period, main loop checks DREQ on period. Note this uses 170 more bytes.

    I have tested the various MEANS on my systems, just not on a Seeduio, but it should based on the pin out. Let me know if this works.


Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.