5
\$\begingroup\$

I am using an Arduino uno currently with the Si4735. I can not currently get the audio from this shield to the Arduino or other sources without using the 1/8 jack. To fix this I am thinking about adding another shield with the functionality I need that has an audio in and audio out. I need the ability to play audio from an SD card or some other source. For example this shield: Audio Shield. I known that a lot of the same pins are used, but do I need to use all of the pins from the Audio Shield? Thanks for any help.

tl;dr: Is there any way to stack these two shields?

\$\endgroup\$

2 Answers 2

5
\$\begingroup\$

Yes, yes you can. And the beauty is that I can tell without even looking at the Si4735 shield you are using.

How is this possible you ask? The only pins that the AudioShield use are the SPI lines (MOSI,MISO,CLK), a SPI chip select line, and an analog pin for reading the potentiometer. Obviously, the A3 analog pin for the potentiometer can be moved around and put on any other analog pin. The chip select is just an active low digital signal used to determine which SPI device should currently be using the data on the SPI lines (the SPI protocol was designed for a shared bus).

So all in all what that means is for the AudioShield, all of the pins it uses were either designed to be shared, or are not really pin specific and through some super-simple hacks can be moved around. The link you provided actually explains how to move the chip select signal that I talked about to a different pin and the potentiometer hack is basically the same but you have to move it to an analog pin. Of course any code samples you use will have to be adjusted for the new pins you use.

For more information on the arduino pins see here.

For more information on sharing the SPI bus between two devices see here.

\$\endgroup\$
3
  • \$\begingroup\$ So I guess, and let me know if I am wrong, I see two separate ways to do this. The first is to reroute all the SPI pins (D8, D11, D12, D13) to different pins (D3, D4, D5, D6). Then reconfigure the code to use those pins when talking to the Rugged Audio Shield? I'm not really sure if that would work. The other thing I read is: The SPI slave select signal is active low (0 to communicate to the Rugged Audio Shield, 1 to communicate to other SPI devices). Can I not just set some value to 0 when talking to the Rugged shield and 1 when talking to the Si4735? Do I have to move pins at all? \$\endgroup\$
    – Scott
    Sep 13, 2012 at 18:36
  • \$\begingroup\$ Actually, after reading the Arduino SPI page it makes more sense lol So I move the D8 pin to say D5 on the Rugged Audio Shield and then use that pin to turn on/off communication to each shield. Is that correct? \$\endgroup\$
    – Scott
    Sep 13, 2012 at 18:49
  • 1
    \$\begingroup\$ Yes, your 2nd comment sounds correct. You cannot move the SPI pins as you describe in your first comment without doing significant software modifications as the SPI interface has dedicated hardware within the microcontroller which is internally routed to those pins. So if you wanted to move those you would have to emulate said hardware in software and route to different pins, you don't want to do that. \$\endgroup\$
    – NickHalden
    Sep 13, 2012 at 21:45
5
\$\begingroup\$

According to the Rugged Audio Shield description, see under 'Pin Usage'

All of the pins can be rewired for maximum flexibility, using cuttable jumpers on the bottom side of the shield (see the picture below). For example, if you want to use a different SPI slave select pin, other than D8, you would cut the small trace between the pins labelled D8 (on the bottom side of the board), then manually solder a wire from another pin (D5 for example) to the pad closest to the label D8 in the figure below.

In the schematic of the SI4735 AM & FM Receiver Shield you see the pin usage of the other board. The D8 pin is in usage, so you should select another pin for the Rugged Audio Shield.

The SI4735 supports 3 different communication methods. It looks like the shield designers have hard wired for SPI communication (GPO2 driven high). You should be fine stacking the shields.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.