Skip to content

SD Card Access – SPI Speed and Other Issues

March 10, 2018

I tried recently hooking up an SD card on the olduino(which i have done in the past) and found it non-responsive.  I hooked it up to an arduino(which worked after i hooked up the IOREF pin which is not used on older arduino’s) and trapped the SPI data.  The main thing i note is that the arduino was had slowed its clock down to 250KHz while the olduino was trying to rip along at 4MHz.  Looking back at this blog the last reference to the SD card on the olduino 1802 was the end of 2013.  At that time I think the SPI would have been clocked at 1-2MHz.  I’ll have to try slowing down the AVR clock routines or bit banging with the olduino.

18-03-08 sd init

**UPDATE** I got a schematic from the manufacturer of the shield i was trying.  It depends on getting 3.3V from the arduino header to power the SD card and level shifter.  I can try powering it from an arduino but it begins to seem like a lot of fuss.**

18-03-12 robotdyn sd

**UPDATE** tried it with 3.3V from the arduino but i found i was missing clocks.  even when i take off the SD card shield the SPI sequences are missing clocks when i have the 3.3v cross connected from the arduino.  no idea why.

18-03-12 missing clocks

 **UPDATE** Finally got this working by bit-banging the spi protocol from the olduino’s parallel port with input on EF3. Still don’t know why it didn’t work with the hardware SPI even after I slowed it down. I DO know that the card draws too much 3.3V power to be supplied from the arduino diecimilia but it’s not clear to me how that could affect things.

Also, here’s an excellent page where someone has captured the SD initialization sequence with a logic analyzer – very useful. I don’t see the author’s name anywhere but i greatly appreciated his work.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: