Shop OBEX P1 Docs P2 Docs Learn Events
SPI Interface — Parallax Forums

SPI Interface

edited 2007-11-26 19:26 in Propeller 1
Would someone point me in the right direction?

I want to read and write data to and from an SD card.· I don't care about FAT file systems since this is a pure internal data logging app.·

Thanks.

Comments

  • Harrison.Harrison. Posts: 484
    edited 2007-11-26 18:44
    Any reason why you can't use Rokicki's FAT16 SD card routines? The package includes a few different sd card spi objects that perform all the 512byte read/write stuff you would probably ever need for interfacing with an SD card.

    http://obex.parallax.com/objects/92/
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-26 18:50
    Have a look at the I/O routines that are part of FemtoBasic (the file sdspiFemto.spin). These are written in assembly, but have a straightforward Spin interface and are written to be used separately from FemtoBasic. They take an SD card address, RAM buffer address, and byte count.
    You have to call start first and supply a two long control block, then you call initSDCard to initialize the SD card routines. At that point, you can read and write to your content. It's possible to modify the Spin interface to do overlapped I/O. Currently the I/O routines wait for completion before returning.

    With SPI, you also get I2C access including the ability to load and run Spin programs from EEPROM or an SD card area.
  • edited 2007-11-26 19:26
    Thanks, I will take a look at them. For my app speed is the most important thing.

    The SPI interface SD card is a fall back. I was going (and still may) to use a 256 MByte Micron NAND chip (8 bit parallel), but getting the TSOP soldered to a custom adapter board is a pain.
Sign In or Register to comment.