I am attempting to write data to a SD card from a ATmega328P micro controller with no luck. I've narrowed down the source of the problem to the MISO output of my SD card breakout board, which doesn't seem to be able to pull up all the way to 3.3V. This is plain to see on an oscilloscope:
In the image above, the SD card is attempting to respond to the master with 0xFF. However, it can only pull up to about 500mV. Below is the clock signal, which I used as a sanity check to verify the oscilloscope was working.
My question is: What could be the source of this problem? I feel as though the answer is staring me right in the face. Perhaps I should take a break and come back with a fresh pair of eyes.
- 16 GB SD Card - TS16GSDHC10E
- Sparkfun Breakout Board (www.sparkfun.com/products/11403)
- ATmega328P on Arduino
- SD card is powered from 3.3V supply pin on Arduino.
- 0-5V MOSI/SS/SCK signals are lowered to 0-3.3V by means of a resistive divider (560Ω over 1.1kΩ, I believe).
- Some sources recommended a large pull-up resistor (~50kΩ) on MISO. This didn't seem to do anything except add a 3.3V DC offset to MISO. Strangely enough, removing the resistor did not remove the DC offset.