SDHC (FAT32 for SD cards)


Closed Thread
Results 1 to 23 of 23

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

    File location fixed in post #1
    Last edited by mackrackit; - 4th November 2010 at 10:54.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2010
    Location
    In the Shed
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Thanks, that link works.

    BTW do you know if Jeremy has any plans to get sub-directories working?

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


    Did you find this post helpful? Yes | No

    Default

    I will ask him.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default SDHC32D need help i am stuck here =[

    Hello Guys,
    i am new with sd cards and i have read almost all posts about them and seriously only you are talking about FAT32 format and have the files.Can anyone guide me?? I am not asking to get free code or something im just stuck here . I have tried just to initialize the card but i failed. Iam using 18F26K22 hardware SSP1 module for communicating with the card and hardware EUART to debug the programm. I dont want to use the SD_WE and SD_CD and i simply didn't connect them.

    Here is what i tried so far but the programm is stucked at "Gosub FSinit" command.
    Code:
    '-------------------------------------------------------------------------------
    'DEFINES  DEFINES  DEFINES  DEFINES  DEFINES  DEFINES  DEFINES  DEFINES  DEFINES
    '-------------------------------------------------------------------------------
    include "modedefs.bas"
    include "fuses_18f26k22.bas"
    include "eusart_defines_ep7.bas"
    
    DEFINE OSC 32
    '-------------------------------------------------------------------------------
    'VARIABLES  VARIABLES  VARIABLES  VARIABLES  VARIABLES  VARIABLES  VARIABLES                  
    '-------------------------------------------------------------------------------
    i var byte
    
    '  COUNTERS  COUNTERS  COUNTERS  COUNTERS  COUNTERS  COUNTERS  COUNTERS COUNTERS
    '-------------------------------------------------------------------------------
    
    
    '  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS  FLAGS
    '-------------------------------------------------------------------------------
    
    
    '  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAYS  ARRAY
    '-------------------------------------------------------------------------------
    
    
    '  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  PORTS  
    '-------------------------------------------------------------------------------
    
    
    '  REGISTERS  REGISTERS  REGISTERS  REGISTERS  REGISTERS  REGISTERS  REGISTERS  
    '-------------------------------------------------------------------------------
    TRISA= %00000000  
    TRISB= %00000011
    TRISC= %00010000
    
    ANSELA=0
    ANSELB=0
    ANSELC=0
    
    include "SDFSHC32original.bas"
    SDC_UseHardSPI = TRUE
    
    goto Init
    '-------------------------------------------------------------------------------
    'ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR   ISR       
    '-------------------------------------------------------------------------------
    
    '-------------------------------------------------------------------------------
    '   Initialization     Initialization      Initialization      Initialization                        
    '-------------------------------------------------------------------------------
    Init:
      PORTB= 0
      PORTA= 0
      PORTC= 0
      FAT_FileName[0] = "N" 
      FAT_FileName[1] = "A" 
      FAT_FileName[2] = "M"
      FAT_FileName[3] = "E" 
      FAT_FileName[4] = "S" 
      FAT_FileName[5] = " "
      FAT_FileName[6] = " " 
      FAT_FileName[7] = " "
      FAT_FileName[8] = "T" 
      FAT_FileName[9] = "X" 
      FAT_FileName[10]= "T"
      Hserout ["Init routine: OK!",13,10]
      for i=0 to 10
        Hserout [fat_filename[i]]
      next i
        Hserout [13,10]
      i= 0 
      PAUSE 100
    
    '-------------------------------------------------------------------------------
    ' Main Programm  Main Programm  Main Programm  Main Programm  Main Programm            
    '-------------------------------------------------------------------------------
    Main:
      Hserout ["LoopCount= ",dec i," FAT_error= ",dec fat_error," SDC_status= ",_
      dec SDC_status," SDC_response= ",dec SDC_response,13,10]
    
      Gosub FSInit
      pause 10
      Gosub FSInit
    
      i= i+1
    goto Main                        
    
    '-------------------------------------------------------------------------------
    'Subroutines  Subroutines  Subroutines  Subroutines  Subroutines  Subroutines   
    '-------------------------------------------------------------------------------
    
    
    end
    and my SDFSHC32D.bas file is attached.
    SDFSHC32Original.bas

    Im looking forward for an answer, Kostas.

  5. #5
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default Re: SDHC (FAT32 for SD cards)

    I'm having the same problem described at the end of this (dead?) thread. Was there ever a solution? BTW, I had it working for FAT16 - so hardware is probably OK.

    Thx

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: SDHC (FAT32 for SD cards)

    FAT16 works. For 32 there is nothing good up to this moment. Also other compilers are good only at 16 as far as I know.

    Ioannis

  7. #7
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default Re: SDHC (FAT32 for SD cards)

    Quote Originally Posted by Ioannis View Post
    FAT16 works. For 32 there is nothing good up to this moment. Also other compilers are good only at 16 as far as I know.
    But what about the posts above. Looks like some folks had a FAT32 library working. Am I missing something?

Members who have read this thread : 2

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