This may sound like a stupid question however I can't seem to get my head around it. Lets say you have a main chip that controls many SPI devices. However, you need to input data from lets say a computer through SPI to the main chip. Can this be done?
Sure. When a Master is done being a master, it needs to set the SS pin (D10 on an Uno for example) to an Input and then be ready to respond as a slave when the D10 goes Low. I would use pinMode (ssPin, INPUT_PULLUP); to make sure it doesn't float low if nothing happens to be driving it, otherwise it could go into slave mode and perhaps appear to be hung when no clocks occur to drive data in.
Thanks for the reply CrossRoads. So should I still set the 'main chip' up as a slave using the SPCR |= _BV(SPE) command?
I don't know, I've never done it.
I'd go with what Nick Gammon demo'd here
about 1/3 down the page.