Picbasic MMC SD : sdfs3.bas


Closed Thread
Results 1 to 20 of 20

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

    Card present is just a switch. I do not use that myself. You could put anything in the socket and make the LED light.

    It is used with SDFS if you want to detect a card and force the code to re-initialize for a new card with out a power cycle, "hot swap".

    At this time do not use it. Just more stuff to debug.

    If you have an 18F4550, or equivalent, to connect like the example might also be a good place to start.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Just a quess since I don't have your hardware to test;

    With the card operating on 3.3V and the PIC on 5V, you should change to a port with
    TTL inputs. Or use some type of buffer, or a PIC that will operate on 3.3V at whatever
    osc speed you need.

    PortC on the 18F452 are Schmitt Trigger type inputs that need higher threshold voltages
    for logic 1 than TTL inputs.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default

    Hi Bruce,

    I do have a resistor voltage divider 1k8_3K3> to gnd for the signals that go from PIC to MMC. The MMC output goes directly to PIC input portc.4 pin 23.
    Could be that the card output level it is not enough to be reconized by the PIC s/t input....
    I will really try with a level shifter and 18f452.
    Any suggestion for a DIL ( not SMD ) device to be used for voltage shifting ?
    Thanks a lot for the help.
    Regards,
    Ambrogio


    Quote Originally Posted by Bruce View Post
    Just a quess since I don't have your hardware to test;

    With the card operating on 3.3V and the PIC on 5V, you should change to a port with
    TTL inputs. Or use some type of buffer, or a PIC that will operate on 3.3V at whatever
    osc speed you need.

    PortC on the 18F452 are Schmitt Trigger type inputs that need higher threshold voltages
    for logic 1 than TTL inputs.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Ambrogio,

    Page 10, Figure 2 is a really simple bi-directional level shifter for 3.3V to 5V systems.
    http://www.standardics.nxp.com/suppo...df/an97055.pdf

    If you have a couple BS170 or similar on-hand, this one works, and it's cheap.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default

    Bruce,
    it is a clever and inxpensive system.
    If I am not wrong, I do have to put the level shifter from the data out of the card ( pin 7 ) to the input of PIC (pin 23) that has a higher VinH because of the S/T input type. It is more than 3v3.
    I will have the BS170 by monday evening.
    Additional question: where can i found the MMC digital interface declaration ?
    I will like to examine a time history diagram from which I will learn to do with simple instruction ...
    > when the SS has to be set hi or lo?
    > same thing for SI, SO, CLK and so on . At the moment I am not able to find those kind of information .Those data are normally declared for all type of IC's I used up to now : where are the mmc interface data history ?
    Thanks very much
    Ambrogio
    North Italy


    Quote Originally Posted by Bruce View Post
    Hi Ambrogio,

    Page 10, Figure 2 is a really simple bi-directional level shifter for 3.3V to 5V systems.
    http://www.standardics.nxp.com/suppo...df/an97055.pdf

    If you have a couple BS170 or similar on-hand, this one works, and it's cheap.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I'm not 100% sure if this what you're looking for, but Jan Axelson has a book titled
    USB Mass Storage that covers MMC & SD cards.

    http://www.lvr.com/usbmstoc.htm

    Scroll down the page for a list.

    You might also want to signup at http://www.jedec.org if you're looking for manuals, docs,
    etc.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default

    Hi to all in the forum ,

    Before starting with the hardware changes, I try with a program found on the web. I modified it for my hardware and it seem to me it is at least initializing the MMC properly.
    The program is : MMC_POST[1] from Gary Warner. The modified one is attached. you can also find attached the terminal screen capture.
    My system does not have the external EEPROM so i think this is the reason for which it does not go on...
    I think it was not an hardware problem : >> What do you think ?
    I will modify the program to avoid external EEPROM to see if it goes on.
    Any comment ?
    Thanks
    Bye
    Ambrogio
    North Italy




    Quote Originally Posted by Bruce View Post
    I'm not 100% sure if this what you're looking for, but Jan Axelson has a book titled
    USB Mass Storage that covers MMC & SD cards.

    http://www.lvr.com/usbmstoc.htm

    Scroll down the page for a list.

    You might also want to signup at http://www.jedec.org if you're looking for manuals, docs,
    etc.
    Attached Files Attached Files

  8. #8
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default

    I do not have the pic18f4550 in m hands now.
    Do you use the SDFS program or do you have other programs in basic ?
    Have you a timed bit interface declaration for the MMC SD ?
    Any time history diagram available just to try with a simple comands and response? Where can I found it on the WEB ? I will like to try with a very simple program ...
    I will order that PIC but it will require some time.
    Do you have in mind some kind of level shifter DIP ( not SMD ) to be used ?
    Thanks
    Ambrogio




    Quote Originally Posted by mackrackit View Post
    Card present is just a switch. I do not use that myself. You could put anything in the socket and make the LED light.

    It is used with SDFS if you want to detect a card and force the code to re-initialize for a new card with out a power cycle, "hot swap".

    At this time do not use it. Just more stuff to debug.

    If you have an 18F4550, or equivalent, to connect like the example might also be a good place to start.

Similar Threads

  1. SD or MMC card as storage for logging
    By HYETİK in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 16th January 2012, 02:07
  2. MMC and SD cards
    By micro in forum General
    Replies: 0
    Last Post: - 8th April 2006, 15:28
  3. Picbasic VS C Compiler
    By koossa in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th October 2005, 21:44
  4. Replies: 22
    Last Post: - 12th July 2005, 17:39
  5. PicBasic Fundamentals
    By Billyc in forum General
    Replies: 9
    Last Post: - 4th May 2004, 10:04

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