Forum Replies Created

Viewing 9 posts - 196 through 204 (of 204 total)
  • Author
    Posts
  • in reply to: Leonardo #1694

    A quick look at the schematic shows an issue with Arduino Leonardo Board, preventing out of the box operation.

    Support for Arduino Leonardo is afflicted by having the SPI pins not routing the same pins as the UNO. This is similar to the Arduino Mega. Where as it appears it should simply work with additional jumpers, from the Leonardo’s ICSP port, which has the SPI pins to the MP3 shields equivalent SPI pins.

    D13 to ICSP3 – SCK
    D12 to ICSP1 – MISO
    D11 to ICSP4 – MOSI
    and remember to not use D10

    Please let us know if this works? I think it should.

    in reply to: Help! It won't Play #1692

    Please check out the Trouble Shooting Guide of common problems.

    Extensive support can be found at GitHub project page . As the code has been written with plenty of insightful comments, describing key components, features and reasoning’s in Doxygen markdown style as to directly auto generate html supporting documentation. Which can be found at GitHub project page. Please read through this document and referring linked resources. As it contains additional resources.

    And if the question still, not known. Please Ask.

    in reply to: using two MP3 shieds at the same time #1691

    Can it be done? YES.

    But at this time this library does not outright support multiple cards.

    I have had discussions about doing this and in an effort toward this. The functions were rolled into the Class as members, as to facilitate multiple instances, in the future. However, many of these members functions need be STATIC due to the use of attachInterrupt’s requirement. And the Arduino’s pseudo Linker is not recognizing indirect referenced pointers correctly. As to allow the members to be none static.

    Additionally the IO pins are defined using macros. With the end goal of making them faster, in the future as the current digitalWrite is quite slow. Consuming most of the realtime actually used.

    Assuming multiple file sources too. Hence  SdFat opening multiple files. SdFat claims this can be done by enabling a define switch. But I have not yet tested it.

    At this time the simplest way to accomplish this is to duplicate the library by another name and rename all the Class and defines to another set of names.

    Or move all defines to be passed to member attributes which are then called in place of the defined macro names. And most importantly don’t use interrupt to refill, rather software timer. So that all the statics can become non-static, so that a second object may be instanced.

     

    in reply to: Bug's and Feature Fixes #1687

    I have completed an extensive enhancing of the Arduino SFEMP3Shield library and have pushed it up to both Bill’s and my repositories. Labeling it Release 1.0.0

    This new release contains several gremlins and newly requested features. Along with support of different hardware by means of refilling either by timers or interrupts. Finally Bit Rate is now read directly from the VS1053 itself. Notice you can actually increase the play speed and turn on Head Phone Spatial effects.

    [1-9] to play a track

    [s] to stop playing

    [+ or -] to change volume

    [> or <] to increment or decrement play speed by 1 factor

    [i] retrieve current audio information (partial list)

    [e] increment Spatial EarSpeaker, default is 0, wraps after 4

    [p] to pause.

    [r] to resume.

    [r] Resets and initializes VS10xx chip.

    [t] to toggle sine wave test

    [m] perform memory test. reset is needed after to recover.

    [h] this help

     

    Most notable effort was in creating supporting documentation and trouble shooting. Many of the questions asked on the forums where directly exampled in the new menu features. Along with a printing of the SdCard’s directory listing.

     

    Extensive support can be found at GitHub project page along with trouble shooting of common problems. As the code has been written with plenty of insightful comments, describing key components, features and reasoning’s in Doxygen markdown style as to directly auto generate html supporting documentation. Which can be found at GitHub project page . Please read through this document and referring linked resources. As it contains additional resources.

    in reply to: All Quiet on the western front… #1684

    Here is an exchange I had with VLSI about the issue.

    In short the BitRate as known by the VSdsp is average, weighing ALL. Even previous file streams. They supplied a work-a-round to reset it.

    http://www.vsdsp-forum.com/phpbb/viewtopic.php?f=11&t=805&sid=01d6bb4b05c18ce72a259409c83d4719&p=3224#p3206

    I have already rolled it in my fork and it appears to work as advertised.

    I am finishing improving the comments of the code with Markdown, as we speak in the next few days, as to support gh_page or Doxygen self documentation generators. And will then push this up as Release 1.0.

    Have Fun.

    in reply to: All Quiet on the western front… #1675

    There is advancement. As I have been sequezing in time on this between the holiday and family. I have made some notes on http://www.billporter.info/forum/topic/bugs-and-feature-fixes/

    Just stuck on the bit rate not appearing constant. I can get it to read most all registers with repeatable response.  Where the bit rate is the only value that does not all ways report back the same.

    I believe the VS10xx is always changing the bit rate to match compression, sampling and clocking. There are many hints of this in the data sheets and on their forum. Where I also believe at the moment the report value is not cleared between songs and that is also averaged in.

    Note sure if BR is really worth it.

    was also just trying to add test sine wave and some low hanging fruit. And may then circle back to combo it with Ethernet Shield.

    You all are welcome to try and provide feed back of https://github.com/mpflaga/Sparkfun-MP3-Player-Shield-Arduino-Library.git before it gets pulled into Bill’s main branch.

     

    in reply to: Converting Library for Seeed Music Shield #1673

    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.

    /**
     * SEEEDUINO:
     * 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.
     */
    //#define USE_MP3_REFILL_MEANS USE_MP3_INTx
    
    //------------------------------------------------------------------------------
    /**
     * 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.
    #endif

    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.

    Thanks.

    in reply to: Bug's and Feature Fixes #1664

    Mp3ReadRegister had issue with FF’ing the upper byte when sign of lower byte was set, due to a carry from shift. This is caused by the following line:
    char response1 = SPI.transfer(0xFF); //Read the first byte
    while(!digitalRead(MP3_DREQ)) ; //Wait for DREQ to go high indicating command is complete
    char response2 = SPI.transfer(0xFF); //Read the second byte
    while(!digitalRead(MP3_DREQ)) ; //Wait for DREQ to go high indicating command is complete

    Where char is not unsigned and its use on response2 causes shift to carry the sign of the previous shift. Changing this to the following fixes this instance:
    unsigned char response2 = SPI.transfer(0xFF); //Read the second byte

    This is why i prefer to use unions in place of shifts  such as

    union twobyte {
    uint16_t word;
    uint8_t  byte[2];
    } ;

    such as below:


    union twobyte resultvalue;

    resultvalue.byte[1] = SPI.transfer(0xFF);
    while(!digitalRead(MP3_DREQ)) ;
    resultvalue.byte[0] = SPI.transfer(0xFF);
    while(!digitalRead(MP3_DREQ)) ;

    return resultvalue.word;

    this way you don’t have to relay on the compiler and op-codes to due an assumed shift as they are not all the same.

    And is in a pending release.

    in reply to: Converting Library for Seeed Music Shield #1627

    Jimmy,

    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.

Viewing 9 posts - 196 through 204 (of 204 total)