Where should I discuss SD/MMC FAT issues?


Closed Thread
Results 1 to 40 of 93

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    I'll post the code if you promise not to laugh.
    The difference between R&D code and pretty code is....who cares...

    Most likely I'll have the code faster by then as tonight I'll probably change it to write the page buffer on the I2C memory. I started with the recommended 10ms delay after a write and once things were stable, I moved it to 5ms. Next step will be polling for busy for the shortest delays.
    5ms is max. write cycle time for the 24LC16 (byte or page).
    You start writing 16 byte pages, and it should speed up by a factor of about 16, with the same 5ms delay after the 16 byte packet is sent out.

  2. #2
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Oh, and yes, the issue about the PC not 'seeing' the complete file was the file size information at offset 28 in the directory table. What you said about flipping the size to LSB first works well.

    For giggles and grins I formatted the MMC as FAT32 and tried to work with the FAT. Let's just say... NOT! I'll stick with FAT16 as long as I can. Does Vista allow FAT16 and or format media cards in FAT16? Thought I heard somewhere that FAT16 support was dropped.
    Last edited by JD123; - 13th March 2008 at 16:43.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    For giggles and grins I formatted the MMC as FAT32 and tried to work with the FAT. Let's just say... NOT! I'll stick with FAT16 as long as I can. Does Vista allow FAT16 and or format media cards in FAT16? Thought I heard somewhere that FAT16 support was dropped.
    In that document, it specifies the cluster count cutoff for determining if something is formatted in FAT12/16/32.
    If FAT16 was dropped, I would infer that FAT12 would've been dropped, which means no more floppies at all.
    If you read that document, FAT32 is easy to work with, just have to take heed of the differences. The thing that's a real pain is the long filename's that come with it. But if you ignore those and stick with 8.3, FAT32 is a piece of cake.

  4. #4


    Did you find this post helpful? Yes | No

    Default MMC specification - free


  5. #5
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Thumbs up

    Quote Originally Posted by BrianT View Post
    Thanks Brian. I have a copy of that. It reads like the USA budget passed by Congress :0 I couldn't find any information about FAT in the doc, though it may be in there.

    Last night I decided to see if I could find a file armed only with the file name. I was able to do it. I started to write a post that cuts to the chase in explaining how I find a file but decided if I was going to get up in the morning, I'd have to finish it later. I'll post it when it's finished. It will be a real time saver for the first-time MMC user.

    In short, I only need to read a few items from the MBR, Partition Record and the Directory Table (I think that's all I was reading - it was late). It's not hard once I know what to look for and stay within the structure of the FAT.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    Thanks Brian. I have a copy of that. It reads like the USA budget passed by Congress :0 I couldn't find any information about FAT in the doc, though it may be in there.
    It's only an MMC document.
    I forget, do you have the FAT spec's document? (fatgen103?)

  7. #7
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Skimask, yes. I have the one you were talking about and about 10 other pages found on the net. Together it's concise.

    Thanks again for the LSB information. As I worked last night, I come to find out that all Word and Dword data that points to an address or its offset are written this way in FAT. I never have used the SWAP function of PBP before, but it's coming in very handy right now.

    {4 data bytes, LSB first} D,C,B,A

    swap A, D
    swap B, C

    {4 data bytes, MSB first} A,B,C,D

    I understand this is just a work-around for the fact that "I" work with Word & Dword addresses as MSB first. I'm stuck in my ways... what can I say!
    Last edited by JD123; - 14th March 2008 at 22:35.

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink Example ???

    Hi, JD ( Pffffff !!!!)

    If you're interested ... I've such a project with a 18F452 ... but Written In MikroC ...
    not so far from Basic.

    I do not know why, but I think you'll be Ok ...

    Alain

    PM me a mailBox address if needed ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    Thanks for the offer. I'll take you up on that. My next step is getting some intelligent information about adding files and making sure things like overwrites and PC compatibility are handled correctly.

    BTW, I recognize you from RCG.

    Gary
    [email protected]
    --

Similar Threads

  1. Reading and Writing from SD/MMC cards as FAT filesystem?
    By charliez in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd June 2006, 22:26

Members who have read this thread : 0

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