SD Card Write/Read


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803

    Default SD Card Write/Read

    I am experimenting with the SD CARD topic on a 18F45K22 chip.

    1. How is the variable FAT_year handled? With a value of 28 it creates a file of the year 2008. If I wanted a 2014 and set FAT_year to 214, it then creates a file in year 2066

    2. Regarding the use of greater that 2GB cards (they are hard to find or expensive...), is there a reliable solution yet?

    Thanks
    Ioannis

  2. #2
    Join Date
    Apr 2012
    Location
    Ptolemaida
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: SD Card Write/Read

    Quote Originally Posted by Ioannis View Post
    1. How is the variable FAT_year handled? With a value of 28 it creates a file of the year 2008. If I wanted a 2014 and set FAT_year to 214, it then creates a file in year 2066
    Ioannis
    DIR_CrtDate = FAT_day | (FAT_month << 5) | (FAT_year << 9) ' Creation date

    DIR_WrtDate = FAT_day | (FAT_month << 5) | (FAT_year << 9) ' Write date.

    This exists in the sdfs.pbp file ioannis, And i think it's the formula that creates the date. I hope it can help you.
    One man's magic is ANOTHER man's engineering.
    Supernatural is a null word

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803


    Did you find this post helpful? Yes | No

    Default Re: SD Card Write/Read

    Hi.

    Darrel has replied in the other forum. It is more easy than it looks.

    The FAT system, starts the year counting from 1980. So, for 2014 all you have to do is 2014-1980=34. Place in the variable FAT_year the value 34 and you 'll be OK.

    Ioannis

Similar Threads

  1. Replies: 1
    Last Post: - 11th December 2012, 22:47
  2. How to write in SD-CARD
    By picluigi in forum mel PIC BASIC
    Replies: 1
    Last Post: - 13th October 2012, 13:01
  3. SD card multiple read blocks giving error
    By jimbostlawrence in forum Code Examples
    Replies: 5
    Last Post: - 20th October 2011, 17:27
  4. Replies: 4
    Last Post: - 3rd January 2008, 23:41
  5. Read and write to sd card
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th October 2007, 19:47

Members who have read this thread : 3

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