Loading...
Pages: [1]   Go Down
Author Topic: SD Card Write Errors  (Read 697 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just built a circuit to interface a micro SD card with the Arduino using a Texas Instruments SN74AHC125N to do the logic level conversion. CS, CLK, and MOSI are connected from the SD card to the Texas Instruments IC and then to the arduino. The MISO pin is connected directly from the Arduino to the SD card. When I test writing data to the card, wait until the file has been closed, and then pull the card out and put it into my computer, some data on the file is corrupt. Here is an example...

This is a test for corrupt data!
This is a test for corrupt data!
This is a test for corrupt data!
This is a test for corrupt data!
This is a test for corrupt data test fnr ck2rupt data!
This is a ESt for co2rupt data!
This is a Est f/r corrupt data!
This is a TESt fnr corrupt data!
This hs a tERt fnr ckrrupt dat!!

Most of the data is correct in the file, but some is corrupt as seen above. I verified that the SD card is good using a computer program, and am still confused why I am getting errors. My circuit is based on this <http://www.ladyada.net/make/logshield/design.html>
Logged

0
Offline Offline
Faraday Member
**
Karma: 12
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's verify some basics:

  • Did you power the 74AHC125 with 3.3V on its power pins (not 5V)?
  • Did you connect a common ground between your homebrew microSD circuit and the Arduino?
  • Did you keep the wiring reasonably short and tight (no more than a few inches?)
  • Did you add a decoupling capacitor close to the SD card power pins?

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forgot the decoupling capacitor on my 3.3V supply! Thanks for the help!
Logged

Pages: [1]   Go Up
Print
 
Jump to: