Ok so I have spent about 20 hours trying to understand why some shields can stack and others can't. I understand that shields can't use the same data pins, if someone could define "data pins" that would be great. I know about SPI communication and how it works and I know that shields can share the SPI pins except for SS or CS, but for example why does the ethernet use pins D10, D11,D12 and D13? are those not the SPI pins that can be shared? Please Please Please help ME! I need very specific information here! you are talking to a complete noob at Arduino! Feel free to link me stuff that will help me understand better but do not link me to a general tutorial like the Sparkfun or the freetronics because their is a 95% chance that iv'e read those tutorials!
Thank you so much guys and from one electrical engineering fanatic to another I say HELP ME!
have you checked - http://shieldlist.org/ - There is a lot of info about stackable shields
Yes I have thanks robtillaart,
that site tells me what pins they use but I need to know why and how I can figure it out on my own, and even knowing when I know which pins a shield uses, I cant make any relations even by looking at the schematics
Many shields have some sort of software library.
These consists in general of a .h and a .cpp file
If the code is setup nice the code names PINs used or refers to standard I2C or SPI or Serial ports.
I’m sorry I really don’t understand
I'm sorry I really don't understand
e.g. the ethernet shield uses the ethernet library.
please name the shields you intend to use. + Link to where you bought them.
I am trying to Use Arduino uno with A:
USB host shield: http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino
and A sensor shield to control multiple servos, I was thinking this one, open for suggestions though: Seeed Studio Bazaar, The IoT Hardware enabler.
I dont know how this will help in me understanding so I hope you're going somewhere with this
FIrst did you notice:
This is legacy product to be used with older and other "not so compatible" Arduino boards. For most other cases, the latest revision of the board is recommended.
On the page of the USB shield is also this link: - "Arduino library and examples, hosted on GitHub"
that repo on github contains many code files and from that you can derive which pins it uses.
The documentation says
If you are planning to use this shield with one of the "Big" Arduinos, like Mega or 2560, SPI signals would have to be rerouted, i.e., pins 13,12,11 of the shield should be connected to pins 50,52,51 of the Mega.
These pins 11,12,13 are part of the standard SPI port (+ default pin10 as CS==Chip Select), you should be able to confirm that on the PCB
There should only be connections from the chip to those pins on the PCB , and the 5V/GND pin of course.
So for the USB host, 13, 12, 11 and 10 are the Pins used, but those are the Serial pins and SPI is the only way apart from I2C of two shields efficiently communicating with one another.
Does that mean the USB host has no data pins that can be tempered by other shields?
I understand that shields can't use the same data pins, if someone could define "data pins" that would be great.
By saying you understand here, you mean you read that but really don't understand, right ?
It's not that difficult.
If you are using a pin for some function on a shield, you can't use that pin for another function on another shield, unless you lock that shield.
Locking a shield might be done by using a CS, Chip Select, signal or a SS for Shield Select i guess.
I know about SPI communication and how it works and I know that shields can share the SPI pins except for SS or CS, but for example why does the ethernet use pins D10, D11,D12 and D13? are those not the SPI pins that can be shared?
Maybe because that shield has 2 devices on board that both use SPI ?
These are the network chip and the SD card (if used).
So you can't use D10 to D13 to light a LED, or control any other signal that is not SPI.
Please Please Please help ME! I need very specific information here! you are talking to a complete noob at Arduino! Feel free to link me stuff that will help me understand better but do not link me to a general tutorial like the Sparkfun or the freetronics because their is a 95% chance that iv'e read those tutorials!
Snap out of it.
You already understood what this is about, but are making things complicated because you think there is some other reason for this.
It's not that complicated, as a matter of fact this is all very logical.
But how come some shields such as the USB show that only the SPI pins are blocked? does that mean that the shield can be used with any other shield as no data pins are being used?
IM gonna try to keep this simple as I feel like im going a bit of topic
USB host shield: Arduino Shield List: Sparkfun USB Host Shield
in that link it says that the USB shield is using the SPI pins (of course) and pin D9, D8 and D7.
where in the schematics of the bored does it indicate that those 3 pins are used by the USB host and cannot be used by any other shield(unless a shield lock or whatever you called it is applied)?
USB host schematic: https://www.sparkfun.com/datasheets/DevTools/Arduino/USBHostShield-v13.pdf
You are asking as if these two are contradicting.
I don't see that, they are confirming each other i'd say.
By the way a Shield Select as i guessed doesn't exist.
SS is specific to SPI and means Slave Select.
If you have this USB host shield in use, pins D7 to D13 are in use and cannot be used for other non SPI shields.
Pins D7, D8 and D9 are exclusive to this shield and pins D10 to D13 are shared amongst all SPI devices.
If you have other SPI devices, you'll have to let those know the data on that bus is meant for them by using other pins than D7, D8 or D9.
The compability list lets you find out any conflicts and may help you decide on how to handle that.
You could have conflicts that can't be resolved, but sometimes you could do some relatively small modifications, rerouting that shield's pins.
It typically requires cutting a wire or two and replacing it with a piece of wire.
And you have to alter the sketch or a library.
Or find an other shield that doesn't conflict of course.