Shop OBEX P1 Docs P2 Docs Learn Events
Examples of SD read/write? — Parallax Forums

Examples of SD read/write?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2007-09-17 03:50 in Propeller 1
Can someone suggest best examples of reading and writing data from the SD?

I'd like to take keyboard data key by key and append it to an SD file.
Also read and display files.

Thanks!
Oldbitcollector

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

— Calvin, of 'Calvin and Hobbes.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-17 03:42
    I don't know if it's a "best example", but both FemtoBasic and BoeBotBasic read and write single bytes from and to an SD card file. Have a look at the OPEN / CLOSE / READ / WRITE statement routines in either one (from the Object Exchange). There's a large CASE statement with all of the statements implemented in it ... look there. There are also routines to load and save Basic programs to SD files in source code form.
  • Mark BramwellMark Bramwell Posts: 56
    edited 2007-09-17 03:43
    Check out "FAT16 routines with secure digital card layer" in the Object Exchange. Very well done and fast. It has some short demos to show how it works. I am using it and it didn't take long.

    I purchased a $5 USB key that was a SD reader. I opened, used double-sided tape and attached it to my PropRPM board. I attached a few connecting wires to the socket and I was in business. The object got me going in minutes.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-09-17 03:50
    Thanks guys! Great leads! I'm up and running..

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

    — Calvin, of 'Calvin and Hobbes.
Sign In or Register to comment.