Shop OBEX P1 Docs P2 Docs Learn Events
FlexProp and P2 microSD board — Parallax Forums

FlexProp and P2 microSD board

Since I am interested in how this would work with FlexBASIC, the other supported languages would also be affected.

A note about the microSD board itself, it looks like it uses 5 pins, but how do you access the other pins that are not being used.

Should FlexBASIC have some code that checks to see what pins are being used by this board and automatically assigns those pins to the SD function. Maybe the board itself should have a driver where it stores the pin numbers that it will be using.

It seems like as we get more of these boards, especially when we have all of the 64 pins available, it seems like it will be a real headache to keep track, on paper, what pins are being used by which accessory board.

Ray

Comments

  • @Rsadeika said:
    Should FlexBASIC have some code that checks to see what pins are being used by this board and automatically assigns those pins to the SD function. Maybe the board itself should have a driver where it stores the pin numbers that it will be using.

    How could FlexBASIC figure out what pins the user has plugged the board into? If it just randomly probes pins with an SPI protocol, checking for responses that look like an SD card, what effect would that have on other hardware? That seems extremely dangerous to me.

    It seems like as we get more of these boards, especially when we have all of the 64 pins available, it seems like it will be a real headache to keep track, on paper, what pins are being used by which accessory board.

    It's up to the user where they plug things into boards, so this could be different for every user.

  • I was just looking through the FlexBASIC Reference, and I see the mount command, how can this be used to mount the new P2 microSD board?

    It looks like the 'mount "/sd", _vfs_open_sdcard()', only works with the P2 Eval board, is that correct?

    Ray

  • There is a variant of the _vfs_open_sdcard() call that is “ _vfs_open_sdcardx()” that lets you specify the pins to use. It behaves just like the “_vfs_open_sdcard()“ in the MOUNT command.

  • @Rsadeika said:
    I was just looking through the FlexBASIC Reference, and I see the mount command, how can this be used to mount the new P2 microSD board?

    It looks like the 'mount "/sd", _vfs_open_sdcard()', only works with the P2 Eval board, is that correct?

    Read the whole description of mount, and/or update your version of FlexProp, and note the list of file systems supported. You can use _vfs_open_sdcardx(CLK, SEL, MISO, MOSI) to open an SD card on any set of pins.

Sign In or Register to comment.