Need help with sd card
Ravenkallen
Posts: 1,057
Hey, guys. I was wondering if anybody knows a really simple demo program to read and write from a uSD card. I am going to use the·uSD adapter that Parallax sells(i have to wait for it to come through the mail). I tried looking at some of the sd objects and they look kinda difficult. FAT-16 and all that lingo can drive you nuts. ANYway, if anybody knows a demo please share.
Comments
* FemtoBasic has them in seperate routines
* fsrw2.6
* Kye did some routines that should be really well documented
ZiCog was (is?) using fsrw2.6 and previously used FemtoBasic
PropDos & PropCmd uses FemtoBasic
Sphinx uses it's own version and may have a corruption bug?
PropDos, PropCmd & Sphinx are a sort of O/S for the prop, so you should look at these.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Post Edited (Cluso99) : 4/21/2010 3:22:13 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
www.leonheller.com/Propeller/test%20-%20Archive%20%20%5BDate%202010.04.21%20%20Time%2018.12%5D.zip
The other code I have is for a different board, and uses VGA. The above should get you started, anyway. It's very easy to use as it writes stuff to the PC via the Prop Plug, as it runs the tests, which you see with the Parallax Serial Terminal software.
I've heard of people soldering directly to the card contacts, so you could try it. If you put it in one of the adapters that are often supplied with them and solder to that, you'll still be able to use it when you get your PCB. I have a 10k pullup on CS (11).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 4/21/2010 7:38:04 PM GMT
http://forums.parallax.com/showthread.php?p=718391
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
http://forums.parallax.com/showthread.php?p=843250
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
In general, objects are stored in the Object Exchange, aka OBEX.
obex.parallax.com/
obex.parallax.com/objects/92/
obex.parallax.com/objects/28/
http://www.rayslogic.com/propeller/Programming/SD_Card/uSD_direct.jpg
There, I soldered (carefully) onto the SD adapter that my uSD came with...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
A very simple way to add an SD card is to buy the SD to microSD adapter and glue and solder the SD adapter to the pcb. A 10K pullup is required on the -CS pin. You may get away without the pullups on the other 3 pins. Place a cap across the power supply pins (1uF Tant may do)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Magio2..... No i do not have a card reader. I am new to sd cards.
WBA consulting...... Thanks for the demo. It looks like the easiest one that i have seen yet. I just don't get the whole "Root directory" thing or the "append file" thing. I wish the protocol was more like i2c, cause that is really easy to use. I2c may be slow and have limited address space, but it works great. So the demo will work just by hooking up the sd card the right way? Do you need to format it or something?
Electricaye..... I checked out the femto basis thing and i think that it would take a lot of work to figure out( Correct me if i am wrong).
Rayman..... That is cool. So you just soldered wires onto the adapter. Looks easy enough.
Leon..... Thanks for the bit about the 10k resistor. Is that the only one you used? And you said it was a pullup?
You will need to format the card first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 4/22/2010 3:12:55 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
The uSD cards used to pretty much always come with an adapter, but lately I see them without an adapter. But, the new PC card readers sometimes have a uSD port...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
BTW, I tried fsrw2.6 yesterday with my hardware, and it worked OK, after I realised that I had to press enter on the PC keyboard to start it. I thought it had a problem, initially, which was puzzling as fsrw2.3 worked straight off. Forget my previous post about the latter, and download fsrw2.6 from the Obex when you want to do some testing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 4/23/2010 7:19:00 PM GMT
Take a look at this. http://www.instructables.com/id/Cheap-DIY-SD-card-breadboard-socket/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
Windoze is able to format with the uSD card plugged into an adapter of some kind to the pc. My laptop has an SD connector. I also have a uSD to USB tiny plug adapter which also works on the pc. I think most cameras and phones will also format SD/uSD if they use them. Getting your files on them may be more difficult with a camera or phone - I have never gone this route.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
That link was very helpful.· I have been wanting to try out the FSRW object for quite a while, but I never got around to getting an SD socket.· I have a few microSD cards, and each one has its own SD adapter socket, so I decided to solder a header to one of them as described in the link.· I was puzzled by the website describing the use of two headers and bending the pins on one of the headers.· I found that it was very simple to file off the extra plastic at the end of the connector and just use·one header that laid flat on the connector fingers.
It only took me about an hour from the time I started soldering the connector to the adapter card to when I ran a successful test using FSRW 2.6.· During that hour I had to find a diagram that showed the SD card pinout, find another diagram that showed how to wire up the four signal pins to the Prop, wire it up on my proto board, download FSRW 2.6 from the OBEX and run it.· BTW, I didn't use any pullup resistors.
Dave