Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: PIC Controlled MP3 player

  1. #11
    Thanks for sharing the hard work Zeus
    www.diysmps.com & www.Micro-Audio.com

  2. #12
    Hi Microsim, thanks for the reply I am attaching the signals captured from my working unit. everything attached are the signals sent out to the Micro Sd card from the microcontroller. In order to avoid issues as I keep working on it I now have the microsd responding to the initialization command both from a pic16F877A and a STM32F100 eval. Both are working fine. I need to go further and send the other commands to the card until I am ready to read the FAT32 structure. I will see if I can carry on with both the pic16F877A and the STM32 as I continue. One thing to note here is that a clock frequency of around 100-200KHz is fine for the device to work.
    Attached Images Attached Images

  3. #13
    How to read a FAT32 formatted Micro SD card:

    In order to find a way through FAT32 I have used two software which have been very helpful a) Winhex b) Active Disk editor

    The FAT32 is read in this order:

    1) Read Sector 0 AKA Master Boot Record

    2) go to the Logical FAT from Values read from MBR and read values here

    3) go to the root directory to get the first cluster of each file

    4) Go to the File Allocation Table find the next clusters for the file and read the clusters

    I have to complete step4 above.

    its easier first to build an excel sheet with formulas, make sure the calculations point to the correct location and then implement the code.

    As I complete the equation for step 4 I will post some more updates

  4. #14
    I finally managed to complete my way till the last drop there is to understand for FAT32 structure and I can navigate easily through now by calculating and specifying my own calculated sectors that hit right on target to find files and their cluster chains. This link was extremely useful http://www.pjrc.com/tech/8051/ide/fat32.html
    I kept looking everywhere on the net but kept coming back to it and found all my answers inside. To make sure my FAT32 algorithms were correct I built an excel sheet with formulas and experimented with Winhex and Active disk editor for both a USB disk and a Micro sd card. What's great about the FAT32 is that independent of whether its implemented independent of the hardware, the same logic applies to find the files. I have some old IDE hard drives I am planning to hack through with. I did notice a small difference in where to read the first sector but otherwise the rest is the same.

    Next step is to implement the algorithm on the pic and the STM32 and ensure they work properly.

  5. #15
    Hi Zeus_threat, have been myself trying to understand fat32, and it has been driving me nuts.
    It would seems that I must be going wrong somewhere and cant fathom it out... grrrrr
    I've been looking at the MBR(sector 0) and have been multiplying various (what i think numbers) to give me
    an address either in sectors or clustors which takes me to the fat file.. but so far nothing.. can you
    please please let me know how you did it..

    Thanks Phil

  6. #16
    Hi sorry haven't been here since a while the following link will help you get through it http://www.pjrc.com/tech/8051/ide/fat32.html and use winhex with your drive to find your way through and cross check your values

  7. #17
    Great effort Zeus,
    Any progress. Updates.
    Thanks

  8. #18
    Hi I am currently thinking of whether I continue with using my own FAT library, use FAT FS or change the control from SPI to SDIO. I'll decide and keep posted

Similar Threads

  1. PGA2311 Digitally controlled pre-amp
    By zeus_threat in forum Pre Amps
    Replies: 33
    Last Post: 05-15-2016, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •