Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

SD Card "RAW" Clone

Home Forums MPLAB XC8 Tutorial Discussions SD Card "RAW" Clone

This topic contains 5 replies, has 2 voices, and was last updated by  Bitahwa Bindu 1 year, 2 months ago.

  • Author
  • #2817


    Would it be possible to clone a “Master” SD card with FAT 16/32 filesystem by doing a SECTOR READ “Master” into RAM -> SECTOR WRITE from RAM  to RAW/unformatted “slave” SD ?
    And for that matter overwrite a FAT 16 “slave” SD with the “Master” FAT32 filesystem, complete with the data on it. ?

  • #2818

    Bitahwa Bindu

    Your question is not clear, what do you mean by master and slave sd cards?

  • #2820


    I want to copy one FAT32/16/12 formatted SD card (the “Master”) with information on it to another unformatted SD card . Thus cloning one SD to another another without knowing or caring about the file system on the “Master” SD card.

    Basically have two SD card sockets and using a PIC 18FXX to read byte by byte, sector by sector from “Master” into a buffer  and write byte by byte, sector by sector  from the buffer to the unformatted SD card.

  • #2821

    Bitahwa Bindu

    You can do the same read operation while selecting one card.

    An SD card cannot be a Master on SPI bus, it has to be a slave, maybe you can choose a PIC with 2 SPI bus, this will give you 2 slaves on the line. Select one slave, read information than select the other slave copy information.

  • #2823


    Hi Thank you, yea I was still unclear in my post about the “Master” concept. I used that term NOT in the context of ths SPI bus but as my Master SD card, with the information on to be duplicated in it’s entirety.
    I will use two SD card sockets and one SPI port. The pic I’m using have 3K Ram for buffer purpose.

    So we are clear that I can do a sector read to buffer, sector write from buffer to unformatted SD card for cloning/duplicating.
    To format a blanc SD card, just clone a formatted SD card to a unformatted SD card in that way, right ?

    Thanx again

  • #2824

    Bitahwa Bindu

    Why don’t you want to format the other sd card? If you want to clone than what’s on 1 should be on the other. I haven’t done it that way but I think it can work your way as well.

    You can also write raw data without using this sd library, but ask on mikroe forum for more information.

You must be logged in to reply to this topic.

Select your currency
EUR Euro
USD United States (US) dollar