We’ve been working on a project called RiderScan for some months now using an Arduino Mega 2560, an Ethernet shield and various other components from Adafruit (Forum post Here: http://forums.adafruit.com/viewtopic.php?f=25&t=22139 )
We ran into a problem with the SPI bus that I was hoping someone might have some insight into how to solve… Right now we have 3 different components that want to use the SPI bus; the Ethernet Shield, an RFID reader breakout board and the Adafruit Wave shield’s SD card. I can get the Wave shield SD card and the RFID reader to work together on the SPI well, the board will scan targets and Wave shield will render voice files in response. However when we actually try to invoke the Ethernet shield to send packets to a server or try to sync with a time server, the system always locks up.
My partner found in documentation that the Cable Select PIN might be the problem - in that when one invokes the Ethernet Shield, it will peg it’s Cable Select PIN (#10) High and keep it there - thus hogging the SPI bus and preventing anything else from using it. The Ethernet Shield can complete it’s task, so it may actually be after the network task is complete the Ethernet Shield isn’t freeing-up the SPI bus. When the Wave shield or RFID card tries to invoke the SPI again, two Cable Select PINs would be set high and the system locks up.
I’ve tried a number of methods to get around this, including stopping and starting the SPI bus after each network operation, trying to use the SD card slot on the Ethernet shield itself - both leading to the same demise. It seems that I can’t use anything else on the SPI other than the Ethernet shield - but I think it more likely that we’re missing something…
Has anyone experienced this or know how to make the Ethernet Shield play nice with other peripherals on the SPI?