Shop OBEX P1 Docs P2 Docs Learn Events
SD interface object - file size? — Parallax Forums

SD interface object - file size?

Langco2008Langco2008 Posts: 4
edited 2008-03-21 03:26 in Propeller 1
Please help: I am using an 1G SD memory card
The buffer block in SD interface object has a limit 512 bytes, what is the best approach to write more data to a file (>512 bytes)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-21 03:26
    You basically write data one block at a time. There is a byte write routine that puts one byte into the buffer and writes the buffer to the SD card when the buffer is full. You could do the reverse where you have a routine that takes a larger block of data and writes it out 512 bytes at a time.

    The file itself can be as large as the medium (1GB in this case). The buffer is 512 bytes because that is what Windows (or DOS or Linux) expects for a block size. If you don't need DOS / Windows compatibility, you can write smaller or larger blocks to the SD card.

    Post Edited (Mike Green) : 3/21/2008 3:32:00 AM GMT
Sign In or Register to comment.