Home Forums Sparkfun MP3 Shield Library Support Forum Can Pin 12 (MISO) be used?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3089
    Anonymous
    Inactive

    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.

    #3091

    The 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.

    #3092
    Anonymous
    Inactive

    Thanks 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!

    #3095

    I 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.

    #3096
    Anonymous
    Inactive

    Great info, thanks Michael!

    #3128
    Anonymous
    Inactive

    Sorry 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.