PIC SD-card hardware interface

Discussion in 'General Electronics Chat' started by jut, May 30, 2009.

  1. jut

    Thread Starter AAC Fanatic!

    Aug 25, 2007
    I'm going to use a PIC18f2520 to read/write files to a SD-card. I have a few questions/assumptions that I'm hoping someone can help with.

    The SD-card requires a Vdd of 2.7-3.6V, so this must be a CMOS IC, yes?

    I'll be using SPI for communications. Since the PIC uses TTL voltage levels, I'm assuming I need to convert a HIGH (5V) the PIC to 3.3V for the SD card for the SDO line (serial data out). I would also need to convert the serial CLK line down to 3.3V as well? Would a voltage divider be OK for this?

    Reading a HIGH from the SD card should be fine -- I put 3.2V on a PIC input and it interpreted this as HIGH.


    SD reference manual:
  2. Papabravo


    Feb 24, 2006
    Using a voltage divider may work, but will be difficult to design properly without knowing what current will be drawn by the load. The de rigueur thing to do is to use a level shifter.


    There are four important points to using this chip in a mixed voltage environment.
    1. Vcc is selected according to where the output goes. If the output goes to a 5V part then Vcc should be 5V. If the output goest to a 3.3V part then Vcc should be 3.3V
    2. In this application (level shifting) always make sure that the level shifter has TTL thresholds (0.8V low, 2.0V high).
    3. Make sure the inputs are 5V tolerant when Vcc is 3.3V
    4. If you don't need the output to be tri-state, then ground the enable.
    Thats all there is -- what could be simpler.