I am attempting to use the MP3 shield with the Relay16 board and there seems to be a pin conflict. Given that the VS1053B decoder is a slave SPI device, is it possible to use DI11 - DI13 instead of DI2 and DI3 and free up the I2C pins for the Relay16 board?
It is possible to use different pins however you will need to modify the code and the mp3 shield.
The code is easy. Both pins are configured in Initialize method on mp3 driver. Di2 is in _dataConfig. It is chipSelect pin for data SPI, and Di3 is input port for DREQ pin. Both can be configure to different pins in that methods.
The hard work comes with shield modification. You need to connect pins from mp3 shield (data CS and DREQ) to different FEZ pins, BUT You also need that signal come from FEZ (Di2, Di3)to relay board.
Rimvis, Thank you for your response.
The MP3 shield does not use Di6, Di7 and Di8. Does anyone know if Di8 can be used for SPI _dataConfig and Di6 for SPI DREQ? (I do not know if Di7 is usable for either of these as well) If so, I do not think it would be too difficult to “green wire” these changes to the MP3 shield.
You can use any pins for chipselect, DREQ, or any other signal. Take a look at the code, if it is OutputPort or Input port then you can use any IO
Gus, thank you for your reply.
Just to make sure that I understand:
Unlike SPI, the I2C bus only works via the specific pins assigned: Di2:SDA and Di3:SCL on the Panda, An4:SDA and An5:SCL on the Mini, etc.
The pins that are configured in the shield driver code - Di2, Di9 and Di3 are used only because SparkFun arbitrarily decided to connect these pins, but the SPI class can use any three Di pins? In addition, if these are the only PINs used by the SPI class can the MP3 shield be connections reduced to only 3 DI Pins + VCC/GND?
The MP3 Shield has many more pins connected than are configured in the shield driver code - including Di13:SPI1 SCK, Di12:SPI1 MISO and Di11:SPI1 MOSI. Are these used by the SPI class to communicate with the DSP?
The I2C, SPI or any peripheral have specific pins that you must use. Now, the MP3 shield uses some general purpose pins. Those GPIOs can be moved to any other unused IOs
You can use MP3 extension instead of the shield if you don’t want to mess with rewiring signals to other pins:
Gus, thank you for the information.
I was able to successfully change Di2 and Di3 to Di7 and Di8 (see picture). Not my best solder job, but it works.
The Relay16 board now works via I2C. I did notice that – when cycling through the relays quickly – relay 8 and 16 would intermittently miss fire or fire in place of each other. Reducing the bus frequency seemed to fix this.
Thanks again for your help! I am trying to create a time-machine for a Christmas program that cycles through a set of lights behind a clock face that are in sync with audio. Though not completely Freakin Easy!, so far I have been impressed with what I can be done in a short period of time.
I am waiting to see a video of your project
i have a similar problem with the mp3-shield…
i cant get any audio
what is the simplest way to solve it?
will i solder as in the picture? or do you have a better idea?
I think GHI will add a music shield in near future which doesn’t need any modifications.
@ Joe - your link doesn’t go to anything on the new product site… then I went and looked and couldn’t find it browsing either. Where’s that bugger (mp3 extension) hiding?
That is a very old link.