[FEZ Panda] Music Shield v1.13 Vs MP3 Shield code

I’m triyng to use the FEZ with a Music Shield v1.13 from Seeedstudio.
Here is the schematic link:

I’m using the MP3 example (modded) to have this shield working, with my FEZ Panda, using the code on the fezzer page:

The mods I have done are in the pins definition, since there are some changes in the pinout in the Initialize() Method:

static public void Initialize()
                SPI.SPI_module spi_module;
                spi_module = SPI.SPI_module.SPI1;
                //spi_module = SPI.SPI_module.SPI2; //è il connettore UEXT

                //Simone, avendo attivato la I2C non posso utilizzare il pin Di3... lo cambio ed utilizzo pin del connettore UEXT
               //_dataConfig = new SPI.Configuration((Cpu.Pin)FEZ_Pin.Digital.Di2, false, 0, 0, false, true, 2000, spi_module);
                //_dataConfig = new SPI.Configuration((Cpu.Pin)FEZ_Pin.Digital.UEXT6, false, 0, 0, false, true, 2000, spi_module);
                _dataConfig = new SPI.Configuration((Cpu.Pin)FEZ_Pin.Digital.An2, false, 0, 0, false, true, 2000, spi_module);

                //_cmdConfig = new SPI.Configuration((Cpu.Pin)FEZ_Pin.Digital.UEXT5, false, 0, 0, false, true, 2000, spi_module);
                _cmdConfig = new SPI.Configuration((Cpu.Pin)FEZ_Pin.Digital.An3, false, 0, 0, false, true, 2000, spi_module);

                // _reset = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.UEXT4, true); //Reset pin is not connected in the this shield
                _reset = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.An0, true); //In questo modo togliamo il reset Hardware del chip!!
                //Simone, avendo attivato la I2C non posso utilizzare il pin Di3... lo cambio (per ora nel IO16...)
                //_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di3, false, Port.ResistorMode.PullUp);
                //_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.UEXT4, false, Port.ResistorMode.PullUp);
                //_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.IO13, false, Port.ResistorMode.PullUp);
                _DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.Disabled); //There is a PullUp res on board

                _spi = new SPI(_dataConfig);


                CommandWrite(SCI_MODE, SM_SDINEW);
                CommandWrite(SCI_CLOCKF, 0x98 << 8);
                CommandWrite(SCI_VOL, 0x0101);  // highest volume -1

                if (CommandRead(SCI_VOL) != (0x0101))
                      throw new Exception("Failed to initialize MP3 Decoder.");


But if I try to lauch this example, I cannot receive the (_DREQ = true), and the Method

private static void Reset()
                while (_DREQ.Read() == false) ;
               CommandWrite(SCI_MODE, (ushort)(CommandRead(SCI_MODE) | SM_RESET));
                while (_DREQ.Read() == false) ;

enters in a infinite loop in the first while(_DREQ.Read() == false);

Is there any soggestions?
Can I have the MP3 Shield schematics to be sure that there are no BIG differences between the “official” board, and my Arduino-capable board?


Did you check the reset pin?

Funny, we just wrote drivers for it and we also are able to recoded or playback audio! We can’t share the code yet till it is completed.

Yes I have done it…and I have 3.3V on it with my mod (An0 setted to digital output with true value)…

…but if you just wrote the drivers… how long did you assume to takes finishing it? (I could help if it is needed)

For a more clear debbugging…I am using a SD-CARD in native mode, and it works very well. I’m not using the uSD card slot on the shield, as it have the different interface (SPI).
In my example, anyway, I have included your Monkey MP3 and MIDI example files…


You can put a small mp3 or midi file in a resource to start testing then you can move to use SD cards.


_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.PullUp);

I had done it… I used your FEZ_Monkey.mp3, but my software have a problem before I use the file…


_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.PullUp);


It was the first way I tried…but without success :frowning:

I tried also PullDown, but no change!! :frowning:

Is that the shield that you are using:


Just want to be sure.

Yes, but I have v1.13 :slight_smile:

I see that VS1053B and SD card are on the same SPI bus and SD card CS pin is pulled down (active). I wonder if that is the issue. Can you measure voltage on SD card CS pin. If it is low try to make it high before you do anything with VS1053B.

I’m more concerned that MISO isn’t used, but connected to some button or something, as this is a rotary buffer, it shouldn’t be connected to anything else! Should it? Or am I on the wrong interface…

Cheers Ian

In fact ignore this as SPI isn’t shown on the schematics I assumed wrong!!

I’m pretty new in this NETMF world, and I just got my FEZ Panda board.
After some playing around, I connected my VS1053 board and couldn’t get it working to start with.
But when I checked the Reset pin, I had plugged it into ground, and it should have been plugged into in 3.3V - as it’s active low!

Best Regards
Thomas Jespersen

I have turned ON the SD_ChipSelect pin, and now it is at true state (3.3V)…but I have the same problem: Always _DREQ == false

I saw also that the SCK,MISO and MOSI pins are connected ONLY on the ISP connector, and not on the PB connector. I have shorted this signals with some wires, so I have the same SPI in the PB and ISP of the MusicShield, but my VS1058 seems to be like “sleeping” and doesn’t turn low the _DREQ pin, or is not capable to do that.
In the schematic it has a 10k Pull up resistor connected to 3.3V, and a 1K series resistor. This signal comes to the PC connector, where I can connect the FEZPanda board with the A1 pin.

I have declared

_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.PullUp); //There is a PullUp res on board


_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.Disabled); //There is a PullUp res on board


_DREQ = new InputPort((Cpu.Pin)FEZ_Pin.Digital.An1, false, Port.ResistorMode.PullDown); //There is a PullUp res on board

but there is no changes…

Have you got any MP3 shield board available or the MP3 shield schematic that works on the FEZ?

I’m using this code: http://www.fezzer.com/project/54/mp3-shield/
This is the connections to the VS1053 chip I’ve made:

  • The xReset should be pulled high
  • SCK, MISO and MOSI is connected to SPI1 on the FEZ
  • xCS is connected to Di9
  • xDCS is connected to Di2
  • DREQ is connected to Di3

Not sure if this is the problem but this shield seem to have some divider resistors on SPI bus. They added them to lower the 5V from Arduino. FEZ is 3.3V already so these are not needed resistors. Could removing these resistors help?

Oh, yes! I can try to solder a bypass wire to remove the resistors.
It is strange because the Arduino can be powered in both 5V and 3.3V, but I’ll give a try… it could depends between FEZ and Arduino’s internal CPU pins different circuitry.
I’ll post my results soon!!

No way… My _DREQ pin doesn’t NEVER turn on 3.3V… :o

I’m feeling very sad about this…

When will be available again the MP3 shield from GHI?

If you like you can use Sparkfun’s MP3 shield: