sd using SDFS.bas FAt16 ON 18F67K22


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838

    Default sd using SDFS.bas FAt16 ON 18F67K22

    Hi guys ,

    i am trying out the SD card using software spi on a 18f67k22 - 64 osc , the pic is at 5v
    I am using the SDFS,bas and example from here

    I have 2 devices on the spi bus with a level converter interfacing to the 2 devices from the Pic .

    I have tested the other device which is also at 3.3v on the spi and it works well.

    The sd card is formatted with fat16 prior on win7 64 and tested ok , 2gb MIcro Sd with SD adaptor , being tested on a SD card adaptor module

    http://www.ebay.com.au/itm/NEW-Perfe...0c173b2&_uhb=1

    I get a init 6 1 255 error and the test stops.


    I need some pointers on what i need to test check to get the sd to work ,
    i can see the card is getting the spi bus clk , MOSI, MISO , and checked the routines are using the correct pins for each direction in the Sd routines

    i am guessing at this point its the speed of spi bus at 64Mhz for initialization on the SD , tried adding " DEFINE SHIFT_PAUSEUS 5" for the shitin/ shift out timing , but it did nothing to change the result


    any help on this one please

    Cheers

    Sheldon

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: sd using SDFS.bas FAt16 ON 18F67K22

    The 6 and the 1 both indicate an Init error.
    And the 255 is an SDC_FLOATING_BUS.

    Make sure your level translator is working in both directions. especially MISO.
    DT

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: sd using SDFS.bas FAt16 ON 18F67K22

    problem turned out to be that the SD card mounting socket

    A Micro sd card adaptor , is used for this SD module but the SD card socket did not connect to the SD card well

    I have found this problem on several sd modules from ebay that i had on hand , with 4 failing out of 10 in the end
    pushing the adaptor card in and holding it in place solved the init problem , for a test , but clearly a better socket is need when using a sd card it seems than the cheep ebay ones

    regards

    sheldon

Similar Threads

  1. Replies: 4
    Last Post: - 24th January 2014, 19:38
  2. SDFS on 18F46K22
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 14th July 2012, 16:27
  3. MicroSD Cards and SDFS
    By rsocor01 in forum General
    Replies: 33
    Last Post: - 28th August 2010, 05:53
  4. FAT16 and memory cards
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 8th September 2005, 16:25
  5. Compact flash support,fat16 included...
    By Moldava in forum PBP Wish List
    Replies: 0
    Last Post: - 11th September 2004, 17:28

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