Go Down

Topic: Teensy++ 2.0 and SD Card (Read 1 time) previous topic - next topic

cottontail

I get the following output...

"errorCode: 0x1, errorData: 0xff"

It seems like a wiring issue but as you can see above I have checked the wiring and as far as I can tell it should be all set.

fat16lib

Error code 0X1 means the SD card does not respond to the first command that SdFat sends.  This is almost certainly a hardware problem.

Hope you are not connecting 5V, SCK, SS, and MOSI directly to the card.  The card runs at 3.3 V and these signals are too high so you need a level shifter.  You can connect MISO directly to the card.

stevemarple

#7
Dec 31, 2011, 09:43 pm Last Edit: Jan 01, 2012, 01:53 am by stevemarple Reason: 1

Hope you are not connecting 5V, SCK, SS, and MOSI directly to the card.  The card runs at 3.3 V and these signals are too high so you need a level shifter.  You can connect MISO directly to the card.


Only if there are no 5V devices on the SPI bus. Why doesn't anyone consider the problem of mixing 3.3V and 5V devices on the SPI bus?

cottontail

According to the product page (http://pjrc.com/store/sd_adaptor.html), the SD board contains "a 3.3 volt regulator and 5 to 3.3 volt buffer chip protects the SD card, and allows interfacing to 5 volt processors."  So yes, it is connected directly to the card.  I figured it was a hardware issue, but when I measured the inputs on the SS, SCLK, MOSI and MISO on the Teensy through analogRead they all showed that they were receiving input.  I have tested it with different MicroSDHC cards and tested the cards in other devices.  I am somewhat at a loss here... any suggestions on other ways to check and correct potential hardware issues?

fat16lib

I have used that Micro SD card adapter with a teensy successfully so it should work with the teensy++ if you have it connected correctly. 

It has the proper regulator and level shifters so that is not a problem.

Measuring the voltage levels is not much of a test and analogRead is meaningless since SS is high in most of your readings so the SD is not selected.

There is nothing you can do with software tests when you get error code 0X1 since no data is received from the card.  It is acting like nothing is connected to the SPI bus.

Go Up