Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FAT32 library using XC8 compiler

Status
Not open for further replies.

Rickooo

Member level 3
Joined
Aug 28, 2018
Messages
67
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
507
Hi, I am working on MP3 player using SD Card. I want to use FAT32 library using XC8 compiler. I read few thread where people are suggesting Petifat and Chan's Fat library. But, I found that it shows many error when it use with XC8 compiler. I am using PIC18F4520 controller. SDHC 8GB FAT32 SD card. I have initialized the SD card. I read https://people.ece.cornell.edu/land.../2016to2017/cl2428_px29/project_19_report.pdf pdf point by point. Now, please suggest where will I find XC8 Fat32 library?

Thanks
 

Hi, I found that, FAT32 library support 512 sector size SD card. Which is only available in 2GB or below SD card. If I used 4GB SD card, than how do I use library with 1024 byte sector size. How I need to change code. Is it sufficient is I just replay 512 byte to 1024 byte. Please find the code. The code is using MPLAB X IDE and XC8 compiler. Thanks
 

Attachments

  • cartao.X.rar
    342.4 KB · Views: 133

I think you may have a more fundamental problem in that MP3 decoding may be a little beyond the PIC18F series without a separate dedicated MP3 decoder chip.
As for FAT32 on the PIC18F4520, I suggest that you look at the MCC plugin as I believe it supports your chip and provides FAT32 functionality.
Susan
 

I think you may have a more fundamental problem in that MP3 decoding may be a little beyond the PIC18F series without a separate dedicated MP3 decoder chip.
As for FAT32 on the PIC18F4520, I suggest that you look at the MCC plugin as I believe it supports your chip and provides FAT32 functionality.
Susan
Hi, I am using VS1011 decoder with PIC18F4520. This microcontroller doesn't support by MCC plugin. Hence, I just want to run 4GB card with 1024 sector bytes. The code is for 512 sector byte. In code, I have replaced, 512 to 1024. And still not get the result. Why? What do you think?
 

I implemented SD file system many years ago, never saw 1k sector size with SDHC cards. The only difference is slightly different initialization sequence. and different sector numbering in read and write commands. Sector size is still 512 bytes.
 

Regarding MCC support, while you are right in that the PIC18F4250 is considered an old chip and therefore not supported, there is not too much difference in the underlying instruction set (n quick comparison between the data sheet listings I could not see any difference).
However MCC generates C code and so the compiler should take care of any difference.
If nothing else, the generated code will give you a good starting point.
Susan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top