Shop OBEX P1 Docs P2 Docs Learn Events
Looking for an SD driver written in spin (SPI) — Parallax Forums

Looking for an SD driver written in spin (SPI)

Cluso99Cluso99 Posts: 18,069
edited 2012-01-09 17:35 in Propeller 1
I am looking to see if anyone has done a spin driver for the SD card - the low level driver usually done in pasm?

I know I can always use a basic SPI driver, but before embarking on this I thought I would ask.

Reason: I want a very small executable. Spin provides this as I am not concerned about speed.

Comments

  • KyeKye Posts: 2,200
    edited 2012-01-09 07:16
    Just rewrite the asm part in SPIN. Its not rather hard actually. ASM code is usally 4X longer than SPIN code.
  • localrogerlocalroger Posts: 3,452
    edited 2012-01-09 07:23
    The original release of fsrw had several different SPI drivers of varying PASMness, including one rather slow but reliable one written entirely in Spin.
  • RaymanRayman Posts: 14,849
    edited 2012-01-09 10:31
    I think rockiki posted his code in C in this forum at one point.
    It might not be too hard to convert that C code to Spin...
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-01-09 13:00
    The FSRW source code is posted on SourceForge at http://sourceforge.net/projects/fsrw/files/fsrw/FSRW1.6/ . The Spin SPI driver is in the zip file, and it is named sdspi.spin.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-01-09 17:35
    Thanks Dave. I did not realise the fsrw package has a spin version of sdspi.
    Much simpler to ask than to reinvent the wheel.

    BTW: I received a tip that the Hydra Manual had a great writeup on SD cards including FAT16 etc. I am aware the Hydra has lots of good explanations.
Sign In or Register to comment.