MicroSD Cards and SDFS


Closed Thread
Results 1 to 34 of 34

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

    Running at 3.3 volts I still pull up pins 8 and 9 on the full size SD cards, the remainder I run straight.

    Norn is correct about the formatting. I read my FAT16 cards on XP, Vista, Vista 7, and Linux. No problems.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Thank you guys for your help. Yes, Norm is correct about the formatting of the MicroSD card. It works .

    Quote Originally Posted by mackrackit View Post
    Running at 3.3 volts I still pull up pins 8 and 9 on the full size SD cards, the remainder I run straight.
    The breakout board that I got from sparkfun.com doesn't have the connection for the NC pad. Maybe, the resistor at NC is not necessary after all .

    http://www.sparkfun.com/commerce/pro...roducts_id=544


    Now, I have a question about SDTEST.BAS. The code to write to the card is

    Code:
    ' Write to file
    	FAT_src[0] = "A"
    	FAT_src[1] = "B"
    	FAT_src[2] = "C"
    	FAT_count = 3
    	Gosub FSfwrite
    	Serout2 PORTC.6, 84, [ "Write ", Dec FAT_error, $d, $a]
    	If (FAT_error != 0) Then Stop
    This code will write "ABC" to the card

    Code:
    ABC
    But, for data logging I need the entries in diferent lines

    Code:
    A
    B
    C
    Can you do that with SDFS? Thank you for your help.

    Robert

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


    Did you find this post helpful? Yes | No

    Default

    Maybe the pull-ups on pins 8 and 9 are not needed... Old habits are hard to break.

    Code:
    ' Write to file
            FAT_src[0] = "A"
            FAT_src[1] = $d
            FAT_src[2] = $a
            FAT_src[3] = "B"
            FAT_src[4] = $d
            FAT_src[5] = $a
            FAT_src[6] = "C"
            FAT_src[7] = $d
            FAT_src[8] = $a
         FAT_src[9] = $d
         FAT_src[10] = $a 
            FAT_count = 11
        Gosub FSfwrite
        Serout2 PORTC.6, 84, [ "Write ", Dec FAT_error, $d, $a]
        If (FAT_error != 0) Then Stop
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Problem solved.... New problem found

    mackrackit,

    Very nice. It works!! This is not in the readme.txt file. How do you know these things? Just kidding.


    Now, I have another problem when trying to combine USB and SDFS. I'm not sure if I should open another thread for this problem.

    When using USB with PBPL you get the next errors

    Code:
    ERROR: Macro USBINIT? not found in macro file.
    ERROR: Macro USBSERVICE? not found in macro file.
    ERROR: Macro USBIN?CBBL not found in macro file.
    ERROR: Macro USBOUT?CBBL not found in macro file.
    The fix for this problem is to include the 18F4550.bal file and the project files in the same directory. This solution was given by Mister_E in the next thread

    http://www.picbasic.co.uk/forum/show...=macro+usbinit

    Now, if I want to combine USB and SDFS I would have to use the file 18F4550.bal. But if I compile my SDFS file with this file in the same directory I get the following error

    Code:
    ERROR: Unable to fit variable SDC_buffer
    I'm using PBP 2.50, MPASM 5.22, and MCS 3.0.0.5. Any help would be greatly appreciated. Thank you.

    Robert

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


    Did you find this post helpful? Yes | No

    Default

    Unfortunately it looks like you need a chip with more memory to do both.

    Any way you could use two MCUs and have them share data? Not the best solution but... it is all I can think of off the top.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Unfortunately it looks like you need a chip with more memory to do both.

    Any way you could use two MCUs and have them share data? Not the best solution but... it is all I can think of off the top.
    Hmmm, I problably didn't explain myself very clear . I get this SDC_buffer error running SDFS only with the file 18F4550.bal in the same directory. This file is necessary to run USB with PBPL. I haven't tried both USB and SDFS at the same time yet. I will probably open a new thread on this problem.

    Robert

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


    Did you find this post helpful? Yes | No

    Default

    If you do not need the USB function of the chip then remove the bal file.
    I am pretty sure PBP will include it if it is in the project directory even if you are not using it. IT being bal
    Dave
    Always wear safety glasses while programming.

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