Shop OBEX P1 Docs P2 Docs Learn Events
Questions about Spin language access to large MicroSD card memory — Parallax Forums

Questions about Spin language access to large MicroSD card memory

bsladebslade Posts: 2
edited 2014-03-26 20:50 in Learn with BlocklyProp
I'm thinking about buying/playing with the Propeller Board of Education [board] on a Boe-Bot robot chassis (see http://learn.parallax.com/PropellerBoeBot )

Assuming I use the Propeller Spin language (and programming environment) and assuming I add a large MicroSD card to the Propeller BOE board, how does the Spin language access the large memory? Ie., If I have a 16gbyte MicroSD card, can I just setup a global array with 16 billion bytes?

Looking at parallax.com/propeller/qna -> Memory -> What is Main Memory, it seems to say there's only 32kbytes of main memory and that main memory holds "program, data, global variables, and stack space" (ie., most everything). It doesn't say anything about accessing a multi-gigabyte MicroSD card.

Thanks in advance
Ben

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-03-26 19:59
    You need to use an object (sub program) to use a SD card with the Propeller. There are a couple of different options.

    I used a uSD card with my PropBOE-Bot. I attached the code to this post.

    You might want to find a simpler example of the using a SD card before trying to decipher my code. I'm pretty sure I've posted a simple example before. I'll see if can can find it and add the link to this thread.

    Edit: I found the simple example.
  • bsladebslade Posts: 2
    edited 2014-03-26 20:32
    So basically, it looks like the SD-MMC-FATEngine (object?) implements read/write file type access to files on the SD chip. (pls, correct me if I'm wrong)

    For the fileSeek method, will that have to sequentially read through the file to get to the right position? Ie., it's not really random access? Is there a way to write to a specific byte or sector on the SD card?

    Thanks in advance again
    Ben
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-03-26 20:50
    bslade wrote: »
    For the fileSeek method, will that have to sequentially read through the file to get to the right position? Ie., it's not really random access? Is there a way to write to a specific byte or sector on the SD card?

    I'm pretty sure you can read or write anywhere in the file. I'm almost sure I've done this in projects.

    I haven't tried to access the card outside of a file system environment but I've read this is also possible.
Sign In or Register to comment.