Shop OBEX P1 Docs P2 Docs Learn Events
How can I tell if the SD card is working or not. — Parallax Forums

How can I tell if the SD card is working or not.

MovieMakerMovieMaker Posts: 502
edited 2008-08-28 00:45 in Propeller 1
After I wire everything up. How exactly can I tell if the SD card is working or not?

Thanks,
smile.gif·

Comments

  • parskoparsko Posts: 501
    edited 2008-08-26 13:01
    If you're using the SD routnine from obex... When you start the cog/SD driver, it will go through an initialization routine with the SD card. This will return a value to you. Certain values indicate certain things. I believe the SD routine will return -1 with a successful startup. I believe it will return 13 with a failed startup. So, the code would look something like this:

    text.dec(cognew(sdroutine, pin))

    That's a bit of pseudocode, enough to note that you would want to print the return from the start sequence. Try that, and let us know what you get.

    -Parsko
  • parskoparsko Posts: 501
    edited 2008-08-26 13:07
    EDIT: In the SD routine from OBEX, you should run the sdrw_test.spin routine. This will confirm hardware. I was wrong, positive values are good, negative values are bad. Read tom's comments at the top of fsrw.spin. If this fails, then you have a hardware issue. It's a pretty bulletproof test.

    -Parsko
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-26 14:18
    @Moviemaker

    Did you get your SD working yet? What pins are you using to connect it?

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-26 16:31
    1st I had it done with the pins that sparkfun listed. Then I changed it to the pins that boebotbasic listed.

    they were shown in a previous post in the questions to mike.
  • parskoparsko Posts: 501
    edited 2008-08-26 16:34
    And it still won't work?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-26 16:35
    Can you be more specific about the exact connection?
    I'd like to assemble a FemtoBASIC test for you.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • DgswanerDgswaner Posts: 795
    edited 2008-08-26 16:38
    you could try the WAV player object, it will read a wav file from an SD card. it's really straight forward to use.... if you have a audio connection.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-28 00:45
    I finally got it working today, actually.· It was working all along, but I could not think of a way to test it. Finally, in BOEBOT basic, I did a "FILES" statement. This listed all of the files on the SD. It worked fine.

    tongue.gif
Sign In or Register to comment.