SDFS3 SD Card File System Errors


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2014
    Posts
    7

    Default SDFS3 SD Card File System Errors

    I have been struggling for a LOOOONGG time to get a working SD Card file system running. I have tried MPLABX with both PICC18 and XC8 (I hate that software) to no avail. I have tried Sourceboost BoostC++, also to no avail. I found SDFS3 and thought my problems might be over. Not so lucky it seems.

    I have the 18F4550 with 20MHz crystal as specified in the file. I am NOT using the level shifters. I am running everything from 3.3V regulator LM1117T. I have the UART working fine. I have the SD card setup the best I can with what I know. The program runs but shows the following when the card is trying to initialize: "Init: 6 1 255"

    At this point the program stops as it has encountered FAT Error (presumably Fatal Error) 6. I have no idea what that means, and can't find anything on the net that gives me a clue. Does anyone know?

    A problem I MIGHT be having is with the SD card connections. I do not have an SD card slot, so I have taken the libery of using connectors to each of the "pins" on the SD card. I have the normal pinout for the SD card showing that there are only 9 "pins", so I had to do some research to find that the referenced 10, 11, and 12 pins are switches on the sd card slot used for making sure the card is in position and is not write protected.

    OK, it looks like the code never uses the write protect or card detect features, so I may not need them anyway. However, since I do not have access to all 12 "pins" listed on the schematic, I did not originally have the 10k pull-up resistors on pins 8 an 9. I added them and the UART output changed to "Init: 6 3 1"

    I have no real idea what I'm doing here. Can anyone help me, please?

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Boy did you get my attention! I have a project sitting on the shelf that is supposed to data log and store data on an SD card. I can't get it working either. However, I'm posting what I was working with for the FAT16 SD cards (2 GB or less).

    Microchip MDD File System v.1.00.zip

    SDFS.BAS

    The ZIP came from Microchip. The .bas is an include file I think put together by Daryl Taylor that essentially converted Microchip's C code to PBP Basic. This is what I've been fighting with. I'll be following along the bouncing ball on this one.

  3. #3
    Join Date
    May 2014
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Thanks, I'll look at it in a bit.

    I've tried using Microchip's stuff in the past. Frankly, I'd rather be set on fire. I can never get their stuff to work right.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    For a basic logging application where all you want to do it write data to an SD-card I'd suggest you take a look at the OpenLog project. It originates from Sparkfun (and they're selling it) but you can find it on EBAY for a couple of bucks. Stick an micro SD card in the socket, connect it to the PIC and throw ASCII data it at 9600 baud (default setting) and it just writes it to a text file. You can set it up to either append data to an existing file or create a new file each time it boots. There are provisions for Reading files as well but I have not tried it and I don't know how userfriendly it would be to do with a PBP.

    With that said, I'd love to get an SD card working for reading/writing so I can possible do a SD-card bootloader etc.

  5. #5
    Join Date
    May 2014
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    I have one of the OpenLog cards. It works well, but I want to use a full size SD card and have it run either from my native code or at worst, a pic18f. You're right thoguh, it works well and will work for my current application. I just want something different (full size sd card, or maybe thumb drive). Either way, I would also like to understand how all this works, and right now I'm drowning.

  6. #6
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    I don't know if you're aware of the uMMC from Rogue Robotics (see link below). They're kinda pricey but they might save your hair.

    https://roguerobotics.com/products/ummc

    Also, check out the link below for thumb drive interface;

    http://www.futureelectronics.com/en/...IVE2.aspx?IM=0
    Last edited by J. Mark Wolf; - 3rd October 2017 at 14:11.

  7. #7
    Join Date
    May 2014
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Yeah, that uMMC is a bit on the "way over my budget" side of things. BUT... the Vdrive looks promising. Thank you for the info. I would llike to be able to do this for myself, but at this point, maybe it's a "who cares" moment and I should just cut my losses.

    Thanks again.

  8. #8
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Quote Originally Posted by mityeltu View Post
    I would llike to be able to do this for myself, but at this point, maybe it's a "who cares" moment and I should just cut my losses.

    Thanks again.
    Been there, done that!

  9. #9
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Microchip’s MDDFS works flawlessly (albeit slow compared with Chan’s FatFS),
    but it’s written in C, and meant to be compiled with one of MC’s C compilers.
    It beats me how Darrel could have used it with BASIC without converting the whole library.

    Older versions of this library also suffer some serious bugs, and don’t support SDHC until later on.

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


    Did you find this post helpful? Yes | No

    Default Re: SDFS3 SD Card File System Errors

    Taylor did not write SDFS.bas for the record, I believe it was Jeff Schmoyer from MeLabs.

    Anyway, here is an old example that might help.
    http://www.picbasic.co.uk/forum/cont...USB-SD-LOGGING
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. SD card file date stamp
    By Alexey in forum General
    Replies: 2
    Last Post: - 18th July 2012, 06:12
  2. SDFS3 / SDFS32 , formattingan SD card from PIC
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th July 2012, 17:15
  3. SDFS3, sd card logging, periodic long delay
    By BUBBA2 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2011, 19:26
  4. SD Card file attributes with SDFS3 ?
    By Chris Barron in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th March 2009, 10:18
  5. 2550 in a coma, mpasm 4k of errors, inc file notfound
    By f_lez in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th June 2007, 18:42

Members who have read this thread : 3

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

Tags for this Thread

Posting Permissions

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