• AVR Freaks

SD not working

Author
LemoX
Super Member
  • Total Posts : 193
  • Reward points : 0
  • Joined: 2009/01/02 19:00:10
  • Status: offline
2009/03/28 18:15:02 (permalink)
0

SD not working

Hi,

I am trying to implement Massive storage using AN1045, I am using Microchip boards (SD pictail and PICDEM HPC Explorer), but I could not put it to work.

I am using ICD2 to for debugging and this application always hangs at FSInit function, which is the function that Initializes the card, loads the master boot record (partition information), loads the boot sector and updates the parameters passed into it with its information.

I supposed that if I am using Microchip code with those Microchip boards, every thing will work nicelly, but not!!!

pinkpinkpink

I would appreciate any help


#1

4 Replies Related Threads

    asmallri
    Super Member
    • Total Posts : 1864
    • Reward points : 0
    • Joined: 2004/05/26 09:00:05
    • Location: Perth, Australia
    • Status: offline
    RE: SD not working 2009/03/29 07:00:26 (permalink)
    0
    I have tried multiple HPCs and SAC164122 Rev3 SD/MMC PICTails and could not get them to work reliably with a +5V pic, such as the PIC18F8722, installed on the HPC. However if a 3.3 volt PIC is installed in place of the PIC18F8722 then it works successfully. The successful work around I used was to replace part of the level conversion logic with a resistor divider. The downside of this modification is that a 3.3 volt PIC should not be able to work with the modified card however my testing to date using 3.3 volt PICs with the modified SD/MMC Pictail has been 100% successful - your mileage may vary.


    **** THIS MODIFICATION ADDRESSES A HARDWARE INCOMPATIBILITY BETWEEN THE MICROCHIP AC164122 REV3 SD/MMC PICTAIL board and the MICROCHIP PICDEM HPC when fitted with a PIC18F8722 ****


    Modification of Microchip AC164122 Rev3 SD/MMC PICTail board to work with the Microchip PICDEM HPC fitted with a 5 volt PIC.

    This modification is for SD cards that operate at 3.3 volts when working in conjection with the HPC fitted with a PIC18F8722 PIC operating at 5.0 volts. The modification covers the removal of U1 integrated circuit which is responsible for level translation from the 5 volt PIC outputs of the SPI bus to the corresponding 3.3 volt inputs of the SD Card. U1 on the affected PICTail board is an VHCT125A manufactured by ON. According to this data sheet it's input are tolerant to 7 volts making this chip apparently a good solution as a level translator between the 5 volt PICs and the 3.3 volt SD/MMC cards. However this is not the case. When the inputs of U1 are over driven (+5volt in with 3.3Volt VDD) the switching propagation delay appears to be impacted with the result that the timing of the SPI bus is corrupted.

    The modification covers the removal of U1 and installation resistor dividers on SCK, SDO and CS respectively (labels refer to the PIC). R11 (activity LED limiting resistor) is also removed as this would adversely affect the voltage divider on the CS line.
     
    1. Remove U1  (VHCT125A)
    2. Install 3.3K resistor (SMD 603) between pad U1-3 to U1-4
    3. Install 3.3K resistor (SMD 603) between pad U1-6 to U1-7
    4. Install 3.3K resistor (SMD 603) between pad U1-8 to U1-10
    5. install 1.8K resistor (SMD 603) between pad U1-2 to U1-3
    6. install 1.8K resistor (SMD 603) between pad U1-5 to U1-6
    7. install 1.8K resistor (SMD 603) between pad U1-9 to U1-8
    8. Remove R11 (activity LED series resistor)
     

    Regards, Andrew

    http://www.brushelectronics.com/index.php?page=software
    Home of Ethernet, SD Card, and Encrypted Serial and USB Bootloaders for PICs!!
    #2
    LemoX
    Super Member
    • Total Posts : 193
    • Reward points : 0
    • Joined: 2009/01/02 19:00:10
    • Status: offline
    RE: SD not working 2009/03/29 22:50:23 (permalink)
    0
    Thanks Asmallri

    I also found an application that shows how to change board's voltage source configuration to reduce it from 5V to a 3,3V, should it also work? I mean doing this I must only change two resistors?

    Thanks

    LemoX
    #3
    asmallri
    Super Member
    • Total Posts : 1864
    • Reward points : 0
    • Joined: 2004/05/26 09:00:05
    • Location: Perth, Australia
    • Status: offline
    RE: SD not working 2009/03/30 06:22:37 (permalink)
    0
    If you change the power supply to 3.3 volts tit will limit the maximum frequency the PIC18F8722 will operate at. If this maximum frequency meets your application's requirements then it should work.

    Regards, Andrew

    http://www.brushelectronics.com/index.php?page=software
    Home of Ethernet, SD Card, and Encrypted Serial and USB Bootloaders for PICs!!
    #4
    LemoX
    Super Member
    • Total Posts : 193
    • Reward points : 0
    • Joined: 2009/01/02 19:00:10
    • Status: offline
    RE: SD not working 2009/03/30 10:34:45 (permalink)
    0
    Hi Asmallri

    I would make those changes, and I try

    Thanks
    Smile
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5