Shop OBEX P1 Docs P2 Docs Learn Events
Two SD Cards? — Parallax Forums

Two SD Cards?

ZenexerZenexer Posts: 20
edited 2011-09-04 00:46 in Propeller 1
Is it possible to interface with two SD cards simultaneously? I tried including two separate instances of SD-MMC_FATEngine, but they appear to conflict.

Comments

  • KyeKye Posts: 2,200
    edited 2011-09-03 17:19
    They shouldn't. Other people have managed to get this working. You need to make 2 completely differently names SD-MMC_FATEngine files.

    So, name one "0-SD-MMC_FATEngine.spin" and the other "1-SD-MMC_FATEngine.spin" and then include both as seperate objects. This will use up a lot of memory.

    When you just include the same file twice it only allows you to have another file open (and much more... read AppNote 6 on the Parallax Semiconductor Website) using the same SD card.

    Thanks,
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-03 18:09
    I don't think just changing the name of the object will work.

    The compiler figures out it's the same object even if it has a different name (this freaks me out).

    I'd suggest changing the end of the driver from:
    DAT
    ' //////////////////////Global Variable Array//////////////////////////////////////////////////////////////////////////////////
    cardClockID             byte 0 ' The secure digital card driver real time clock installed flag.
    cardLockID              byte 0 ' The secure digital card driver lock number.
    cardCogID               byte 0 ' The secure digital card driver cog number.
    ' /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    

    to:
    DAT
    ' //////////////////////Global Variable Array//////////////////////////////////////////////////////////////////////////////////
    cardClockID             byte 0 ' The secure digital card driver real time clock installed flag.
    cardLockID              byte 0 ' The secure digital card driver lock number.
    cardCogID               byte 1 ' The secure digital card driver cog number.
    ' /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    

    This should be enough to keep the compiler from keeping only one copy of the object.

    Duane
  • ZenexerZenexer Posts: 20
    edited 2011-09-04 00:46
    Kye, that's what I had tried, but it would just freeze while starting the first engine.

    Duane, I'll try that, but I don't think that's the issue, as I'm getting a different effect when I use two differently named files than when I use a single file.

    If it makes a difference, I'm using bst. That could explain why Duane's point _seems_ inapplicable (though I will give it a shot anyway).
Sign In or Register to comment.