Tuesday, 19 December 2017

software - How to avoid SD Card and W1500 SPI mixup on the Ethernet Shield?



In an answer Kevin Mark points to a solution/reason for the usage of the Ethernet shield together with the SD Card. The documentation says that SD Card and the Ethernet chip both share the SPI bus and that I have to set different pins on HIGH to tell the Ethernet shield to use the Ethernet OR the SD Card.


How would such a solution look like?


pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

// Now I can use the SD Card?

pinMode(10, OUTPUT);
digitalWrite(10, HIGH);


// Now I can use the Ethernet (W5100)?

// Do I have to (re)set 4 to LOW?
// Any possibility to use both at the same time?
// Can I use the Ethernet/SD Card without the setting of pin 4 or 10?
// Why is this missing on the official code examples? Is it really necessary?


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...