Home › Forums › Sparkfun MP3 Shield Library Support Forum › Can Pin 12 (MISO) be used?
- This topic has 5 replies, 3 voices, and was last updated 10 years, 11 months ago by Anonymous.
-
AuthorPosts
-
January 21, 2014 at 11:13 am #3089AnonymousInactive
From what I understand, the VS1053 chip doesn’t send feedback to the Arduino over SPI. Is this correct? I’m wondering if pin 12 on the Arduino could be used as GPIO.
January 21, 2014 at 8:45 pm #3091Michael P. FlagaMemberThe short answer is – Do not use PIN12. (unless it is your last resort.)
The SPI’s Tx and Rx and Clock pins are dedicated together as a resource. (MISO must be an input) Unless you have a custom wired breakout or shield the MISO is hardwired from the Vdsp to the AVR.
While what you say is possible with a few cuts and jumps and edit to this library. This library does support other commands to the Vdsp that are equally receiving and would need to be omitted.
I highly recommend using another GPIO. Please note that A0-A5 are also available as GPIO.
January 23, 2014 at 3:24 pm #3092AnonymousInactiveThanks for the reply. I have maxed out all available analogue and digital pins on the Arduino with my project application, including D3 and D4 since I’m not using MIDI. I’m using Timer1 which doesn’t allow me to use pins 9 & 10 (had to change SDcard chip select to another pin).
I suppose I will dig through the library to try to pinpoint which functions dictate the use of the MISO for communication with the Vdsp (unless you know off the top of your head?), I may not require them and could free up the pin. Not worried about any modification to the board traces that may be required. Otherwise I guess I will be learning about shift registers!
January 23, 2014 at 11:18 pm #3095Michael P. FlagaMemberI believe the problem code that needs editing are in the vs_init() there are some Mp3ReadRegister() that check the initial status of the Vdsp. Which can be commented out. Additionally I see the flush_cancel() also reads. This is called at a STOP or End of File. comment it out in the refill(). However, you can then only play the same type of files. As it won’t start new file type hunting.(but likely not an issue)
Where the rest of the Mp3ReadRegister are in functions that can simply not be called. This will be most all of the GET… and SET… along with the RESUME and SKIP functions.
Where playing or simply sending a stream as you earlier observe will work disregarding the MISO.
Alternately, one chip select to both 74HC595 and 74hc164 will provide you some INPUT and OUTPUT. a good cost ratio of one pin for 2*8
Also there are GPIO on the VS1053. I have not added calls to these. And would be simple enough to add. I saw AdaFruit’s recent VS1053 library have such for there breakout.
January 27, 2014 at 10:23 am #3096AnonymousInactiveGreat info, thanks Michael!
February 19, 2014 at 9:40 pm #3128AnonymousInactiveSorry to bother you but I have a similar scenario where the playtrack function does not work properly, and surely it’s my fault:
<span style=”font-size: 13px;”>I have a PIR sensor wired to PIN12 and once it detects movement the Mp3Shield plays a sound. Everything works for some amount a time, after this random time the PlayTrack function stops working. PlayTrack does not return a value and it seems it gets cycled. Does this happen because I am using PIN 12 for the PIR alarm sensor?? </span>
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.