noob on this

Hi, im really noob on arduino and i want to know how can i select between different shields, for example if i have plugged 2 arduino shields and both uses SPI port how can i select wich device is active?

it can be a so fool question but i have no idea.

THANKS

Unless the shield has a jumper or something to block the signal, you can't.

Both shields will share the data sent through the pins, and weird things might start to happen.

ok there is no way to select a device like on I2C bus?

I thought things on SPI and I2C busses were addressable?

Provided the slaves implement the protocols correctly, and don't have addresses that interfere with one another (and/or can be changed in some manner; one would think this would be a requirement of the firmware) - shouldn't it be possible to have as many as needed on the bus (up to the limits of the bus/protocol/distance), provided they all have non-conflicting addresses?

:-?

Ok, maybe I'm in over my head, I don't have too much experience with SPI and I2C.

You're probably right, Cr0sh. :-[

You can connect more than one SPI slave device to your Arduino. The lines D11 (MOSI), D12 (MISO), D13 (SCK) will be common. Each SPI device needs to be made active by its own, dedicated (thus separate) CS line. For example, the SD card shield uses D10 as its CS.

Each SPI device needs to be made active by its own, dedicated (thus separate) CS line. For example, the SD card shield uses D10 as its CS.

Yep. You should be able to connect as many as you like (in theory) becuase the I2C devices are all seperately addressable.

Mowcius

i know on i2c i can change the address of the devices but can i change the CS line each shield use? i want to use the ethernet and sd card shield.

Thanks

can i change the CS line each shield use

You need two dedicated CS lines: one for SD card and another for ethernet shield. Enable each one when needed.