Hi!
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:
http://www.fezzer.com/project/54/mp3-shield/
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);
//Simone
// _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);
Reset();
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));
Thread.Sleep(1);
while (_DREQ.Read() == false) ;
Thread.Sleep(100);
}
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?
Regards,
Simone