MicroSD Cards and SDFS


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Unfortunately it looks like you need a chip with more memory to do both.

    Any way you could use two MCUs and have them share data? Not the best solution but... it is all I can think of off the top.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Unfortunately it looks like you need a chip with more memory to do both.

    Any way you could use two MCUs and have them share data? Not the best solution but... it is all I can think of off the top.
    Hmmm, I problably didn't explain myself very clear . I get this SDC_buffer error running SDFS only with the file 18F4550.bal in the same directory. This file is necessary to run USB with PBPL. I haven't tried both USB and SDFS at the same time yet. I will probably open a new thread on this problem.

    Robert

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If you do not need the USB function of the chip then remove the bal file.
    I am pretty sure PBP will include it if it is in the project directory even if you are not using it. IT being bal
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    mackrackit,

    My project is going well. Without your help I would be still stuck trying to make this SDFS work. Thank you for your help.

    After a lot of reading, I figured out a way to make USB and SDFS work. I had to modify the 18F4550.bal file. There are two versions of this file, one for USB and one for non-USB devices. The option for USB devices had some memory settings commented out. I enabled back these settings and BINGO, it worked.

    Robert

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    mackrackit,

    In my project, data is read from the MicroSD card and sent to a TFT LCD display. As you can imagine, speed is very important. Let's say that I have the following bytes in my TXT file and I want to read them

    Code:
    203
    37
    92
    When you read these values with SDFS you get something like

    Code:
    FAT_dest[0] = 50     'ASCII number for "2"
    FAT_dest[1] = 48     'ASCII number for "0"
    FAT_dest[2] = 51     'ASCII number for "3"
    FAT_dest[3] = 13     'ASCII number for "CR"
    FAT_dest[4] = 10     'ASCII number for "LF"
    FAT_dest[5] = 51     'ASCII number for "3"
    FAT_dest[6] = 55     'ASCII number for "7"
    FAT_dest[7] = 13     'ASCII number for "CR"
    FAT_dest[8] = 10     'ASCII number for "LF"
    FAT_dest[9] = 57     'ASCII number for "9"
    FAT_dest[10] = 50     'ASCII number for "2"
    Then, you have to do some data manipulation to obtain the bytes that you need, 203, 37, and 92. This takes too much time . Is there any way or is there any format for my TXT file that I can use were I would obtain a SDFS reading like the following?

    Code:
    FAT_dest[0] = 203  
    FAT_dest[1] = 37
    FAT_dest[2] = 92
    This would speed up my program a lot and I would obtain much better graphics in my TFT display. Thank you for your help.

    Robert

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not have a good answer at the moment. I mostly use SD card for logging and yes the FAT file system can be a bit slow.

    How often is the display updated in your app?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    ........ and yes the FAT file system can be a bit slow.
    So, is the FAT32 (SDFSHC32) much faster than FAT (SDFS3)? I didn't go for the FAT32 because it takes a lot of space in the chip.

    The display changes whenever a new screen is selected and hopefully the transition should be smooth. What do you think would be the best way to read the data from the card the way I need it?

    Robert

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts