VS1053 reports 'DREQ pin is not an interrupt pin' on Micro

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fcohen
 
Posts: 53
Joined: Mon Jan 06, 2014 5:14 am

VS1053 reports 'DREQ pin is not an interrupt pin' on Micro

Post by fcohen »

i am running on an Arduino Micro with the Adafruit VS1053 codec breakout board. I do not hear the song start. I see this in the Serial Manager when I run my sketch:

SD OK!
DREQ pin is not an interrupt pin
Playing music file 1
Playing music file 2.

See the attached graphic for a pin diagram. I

Here is a snippet of the sketch:

Code: Select all

#define RESET 9      // VS1053 reset pin (output)
#define CS 10        // VS1053 chip select pin (output)
#define DCS 8        // VS1053 Data/command select pin (output)
#define DREQ 2       // VS1053 Data request pin (into Arduino)
#define CARDCS 6     // Card chip select pin

Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(RESET, CS, DCS, DREQ, CARDCS);

    // initialise the music player
    if (!musicPlayer.begin()) {
      Serial.println("VS1053 not found");
    }

    musicPlayer.sineTest(0x44, 500);    // Make a tone to indicate VS1053 is working
   
    if (!SD.begin(CARDCS)) {
      Serial.println("SD failed, or not present");
      while (1);  // don't do anything more
    }
    Serial.println("SD OK!");
    
    // Set volume for left, right channels. lower numbers == louder volume!
    musicPlayer.setVolume(20,20);

    if (! musicPlayer.useInterrupt( DREQ ))  //DREQ int, VS1053_FILEPLAYER_PIN_INT
      Serial.println("DREQ pin is not an interrupt pin");
        
    Serial.println("Playing music file 1");

    if (! musicPlayer.startPlayingFile("FRANK.OGG")) {
      Serial.println("Could not open file");
      return;
    }

    Serial.println("Playing music file 2.");
Maybe I should not being using Pin 2 for DREQ?

-Frank
Attachments
pins.jpg
pins.jpg (152.61 KiB) Viewed 541 times
Last edited by adafruit_support_bill on Fri Feb 28, 2014 7:06 am, edited 1 time in total.
Reason: Please use the 'code' button when submitting code - click 'code' and paste your code between the tags.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 reports 'DREQ pin is not an interrupt pin' on Mic

Post by adafruit_support_bill »

This is a little confusing. You don't pass DREQ to the useInterrupt() function, you pass it into the constructor. The useInterrupt() function is just telling the library which type of interrupt to use.

Code: Select all

musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT)
See the player_interrupt example for details.

User avatar
fcohen
 
Posts: 53
Joined: Mon Jan 06, 2014 5:14 am

Re: VS1053 reports 'DREQ pin is not an interrupt pin' on Mic

Post by fcohen »

Thanks Bill. I changed it to VS1053_FILEPLAYER_PIN_INT and I can get the music file to play. So this issue is done. Next one is getting the VS1053 and NeoPixels to run on the same Micro. Thanks. -Frank

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”