Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic: SD Card - Page 2 — Parallax Forums

PropBasic: SD Card

2»

Comments

  • HarleyHarley Posts: 997
    edited 2010-09-15 11:53
    Sapieha,

    Thank you, I downloaded the two files (OSX version for me), but found the IDE Preferences under 'bst' not Tools' menu.

    Now to read the documentation to know what to do to begin.
  • SapiehaSapieha Posts: 2,964
    edited 2010-09-15 12:01
    Hi Harley

    You need start BSTC and link PropBasic to IDE before it can recognize it.

    Look on attachment


    Harley wrote: »
    Sapieha,

    Thank you, I downloaded the two files (OSX version for me), but found the IDE Preferences under 'bst' not Tools' menu.

    Now to read the documentation to know what to do to begin.
    1920 x 1080 - 310K
  • HarleyHarley Posts: 997
    edited 2010-09-15 13:33
    Sapieha, I don't see a screen anything like what you are showing. Mine is like this attachment; a .tiff format. Lower-case 'bst' for the application on the window title, and this next window.

    I don't have anything called BSTC, and if I did how does one link PropBasic to IDE. I don't have anything called PropBASICIDE. I'm wondering if I got something wrong somewhere.
  • SapiehaSapieha Posts: 2,964
    edited 2010-09-15 13:41
    Hi Harley.

    Sorry I dont know mych on OSX

    BUT in BST You need find Top Menu Like on my BST.
    And in it Tools --> IDE Preferences.

    I think that menu opens with one of round buttons Top Left on BST window

    Harley wrote: »
    Sapieha, I don't see a screen anything like what you are showing. Mine is like this attachment; a .tiff format. Lower-case 'bst' for the application on the window title, and this next window.

    I don't have anything called BSTC, and if I did how does one link PropBasic to IDE. I don't have anything called PropBASICIDE. I'm wondering if I got something wrong somewhere.
  • max72max72 Posts: 1,155
    edited 2010-09-16 03:04
    New test run, still the same set of SD cards. i hope to be able to test also a bigger one...

    debug results:

    ? - SDplay -
    Insert card : Card inserted.
    Card name=S016B ,Serial number=997232359

    0 93 1 50 19 89 128 227 118 217 207 255 22 64 0 79
    909 6 9
    Blocksize=512 ,Totalsectors=232960 ,Totalcapacity=119275520
    -- Data Written OK! --
    -- Data Read OK! --
    20 bytes of data back from card:
    ABCDEFGHIJKLMNOPQRST
    End.

    ? - SDplay -
    Insert card : Card inserted.
    Card name=128MB ,Serial number=269180828

    0 54 0 50 23 89 129 221 118 218 255 129 150 64 0 233
    1909 6 9
    Blocksize=512 ,Totalsectors=488960 ,Totalcapacity=250347520
    -- Data Written OK! --
    -- Data Read OK! --
    20 bytes of data back from card:
    ABCDEFGHIJKLMNOPQRST
    End.

    ? - SDplay -
    Insert card : Card inserted.
    Card name=SD256 ,Serial number=1615369124

    0 38 0 50 31 89 131 196 254 250 207 255 146 64 64 193
    3859 6 9
    Blocksize=512 ,Totalsectors=988160 ,Totalcapacity=505937920
    -- Data Written OK! --
    -- Data Read OK! --
    20 bytes of data back from card:
    ABCDEFGHIJKLMNOPQRST
    End.

    Thanks for your effort.
    Massimo
  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2010-09-16 03:21
    Well, the quick fix is in sd.lib, around line 291...

    change
    INC SD_sectormult, 2
    
    to
    INC SD_sectormult, 1
    


    BUT, this does not solve the matter. The SD card spec clearly states to add 2 to the mult value. It might be your cards are a different version/standard to mine??

    1. I will look through the other "standards" to see if there is a case where adding 1 is desired!

    2. I kindly ask if any other forum members could try this routine to establish the results from a different source?

    Hope we can solve this soon...
  • max72max72 Posts: 1,155
    edited 2010-09-16 04:19
    Could it be related to the card size? Up to now I have been able to test it with small cards. Are yours bigger?

    Massimo

    PS: I solved the code modify issue putting a propeller pin to ground and using it as detect pin.
  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2010-09-16 06:27
    Massimo,

    Comparing your debugging data to mine I could find the problem! I was reading the wrong bits for the sd_mult, which by luck were correct on my cards !

    Here is the updated sd.lib with debug code still included. If you can report back that its ok, I will update the non-debug version at the top of this thread :)

    Thank you so much for your help.
    Max.
  • max72max72 Posts: 1,155
    edited 2010-09-16 13:57
    I'll be way from my cards for a couple of days. I'll test it ASAP.
    Thanks again.

    Massimo
  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2010-09-24 08:23
    I have updated the sd.lib to fix the "mult" problem identifed by MAX72 (thank you Massimo!)

    The latest version is now available in the first post.

    :)
Sign In or Register to comment.