I'm trying to get a nrf24l01 radio and an SD card working in the same system.
Using a Mega2560, the "mega compatible" ethernet shield works fine on it's own for both ethernet and SD card access. (CD CS =4, Ether CS reputed to be 10)
Likewise, without the ether shield, the radio works fine.(radio connected via pins 50-53 + CE on 8 )
However, put them both in the system ,and i just get nothing useful from the radio (just zero length received messages)
I've made sure that both 10 and 53 are outputs.
I dont access the SD or radio at the same time - and I never intentionally access the Ethernet (not used in this system).
I did think it might be a Chip select issue, but i've tried forcing CS for the Ether and Card low when I want to use the radio without success.
I just found some other posts referring to putting a cap across the power on the radio module to smooth the supply, and tried that with no obvious change.
Try each device code with both devices (or three if ethernet shield) connected to the Arduino. Try the nRF24 code first with this added to the setup function.
Yes, adding the digitalWrite(10,HIGH); makes the radio start working, with the shield connected. I'm still getting SD file open errors but that is probably unrelated. I'd forgotten that the CS is active low.
It may not be unrelated. Try the same theory using the SD card sketch. Disable the w5100 and the nRF24 slave selects and see if the SD card works ok. Same with the w5100 code.
Bear in mind these devices on their own are a bit power hungry. It could be all running at the same time is overloading the power supply. The SD card requires almost 100ma to read/write.
SurferTim:
Try each device code with both devices (or three if ethernet shield) connected to the Arduino. Try the nRF24 code first with this added to the setup function.
This is very interesting, finally a good solution. But I have to test and also I have a question. If I want to activate back W5100 I have to set pinMode 10 as output in Low state and the other 2 devices in high?
What does it means power hungry for all three devices together, SD, w5100 and NRF24? Couldn't be more than 1A, isn't it?
In my practice this theory does not work. I have an arduino Mega2560 and I disabled w5100, also disabled SD and set to LOW pin 9 as being the CS for NRF24L01 and the communication does not work. Same software works great if I remove w5100 with SD board.
Does anybody has anything to try to make this 3 work together?