user18935: I have a microSD connected to an Arduino and I can't program it over ISP without removing the SD card. Does anybody know how to prevent the SD card from interfering with the ISP programming?
Details:
This is the microSD breakout: https://www.adafruit.com/products/254
I'm using an ATMEGA328P at 3.3V 8MHz.
I'm not using a bootloader and, for several reasons, I can't use the serial port for programming.
Thanks!

user47017: I had the exact same problem, also using Arduino (Atmega 328P). I have an sd card module with a different layout, but also with a level shifter. My circuit is running at 5V (which is appropriate when using a level shifter).

To resolve the issue I just installed a pullup resistor (10k) on my own board to the chip select line of the sd module, which keeps the sd card unselected while programming the MCU. Now it works.

There seems to be no pullup integrated into the module. Hence the CS is low during programming (without the pullup), the sd card thinks it should answer the SPI commands, and so interferes with the communication to the MCU, which is why programming over an ISP fails.

user4143: Because the SD card is an SPI device it shares the same pins as the ISP interface. The only way to not have the SD card interfere with the ISP is to not have the SD card connected.
As you have seen, that can be achieved by removing the card.
It can also be achieved by adding a tri-state buffer between the MCU and the card so the MCU only connects the card to the SPI bus when it is ready to use it - under default operation the card is disconnected.

18935: <p>I have a microSD connected to an Arduino and I can't program it over ISP without removing the SD card. Does anybody know how to prevent the SD card from interfering with the ISP programming?</p>

<p>Details:</p>

<p>This is the microSD breakout: <a href="https://www.adafruit.com/products/254" rel="noreferrer">https://www.adafruit.com/products/254</a></p>

<p>I'm using an ATMEGA328P at 3.3V 8MHz.</p>

<p>I'm not using a bootloader and, for several reasons, I can't use the serial port for programming.</p>

<p>Thanks!</p>
 47017: <p>I had the exact same problem, also using Arduino (Atmega 328P). I have an sd card module with a different layout, but also with a level shifter. My circuit is running at 5V (which is appropriate when using a level shifter).</p>

<p><a href="https://i.stack.imgur.com/PrAD1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PrAD1.jpg" alt="enter image description here"></a></p>

<p>To resolve the issue I just installed a pullup resistor (10k) on my own board to the chip select line of the sd module, which keeps the sd card unselected while programming the MCU. Now it works.</p>

<p><a href="https://i.stack.imgur.com/dJq6L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dJq6L.png" alt="enter image description here"></a></p>

<p>There seems to be no pullup integrated into the module. Hence the CS is low during programming (without the pullup), the sd card thinks it should answer the SPI commands, and so interferes with the communication to the MCU, which is why programming over an ISP fails.</p>
 4143: <p>Because the SD card is an SPI device it shares the same pins as the ISP interface. The only way to not have the SD card interfere with the ISP is to not have the SD card connected.</p>

<p>As you have seen, that can be achieved by removing the card.</p>

<p>It can also be achieved by adding a tri-state buffer between the MCU and the card so the MCU only connects the card to the SPI bus when it is ready to use it - under default operation the card is disconnected.</p>
