- 07/09/2018 at 18:43 #3361
I am thinking of using the ChaN FS library to access an SD card. I downloaded your sample program and tried to compile it. I get quite a few warnings. Here are a few examples:
ff.c:2130:: warning: (759) expression generates no code
ff.c:2603:: warning: (1498) pointer (f_read@br) in expression may have no targets
mcc_generated_files/spi1.c:111:: warning: (1498) pointer (SPI1_Exchange8bitBuffer@dataOut) in expression may have no targets
Any ideas on these?
I also have a question: what file contains the low level SPI code?
- 07/09/2018 at 21:00 #3365
Hi. The warnings could be caused by various things. As you provided very little information of the tools you are using, I can’t really guess. This sample project was done some few years ago, a lot has change since then: new FatFs versions, New MCC versions, new MPLAB X IDE versions, new XC8 versions especially the new v2.
And warnings are not necessarily gonna make your project not to work.
Are you testing already with hardware?
The SPI low level functions are handled by MCC. Check the SPI.C and SPI.h files generated by MCC. They’ve got nothing to do with FatFs.
- 08/09/2018 at 02:25 #3366
Hi Bitahwa, Thank you for the quick response. Sorry I forgot to state my environment.
MPLAB X 5.05, xc8 v2.0, FatFs vR0.13b. I don’t think MCC enters into the issue since I am using your sample project.
I do not yet have hardware. I am just doing some preliminary investigations to determine a good starting point. I am attempting to compare FatFs with the MLA from Microchip.
- 08/09/2018 at 02:54 #3367
It all gonna depends on what you are trying to achieve, the PIC you are using, the amount of resources required and the required features.
FatFs is quite popular, you might get support from many forums and it regularly maintained. It’s main advantage, it can be used by a variety of microcontrollers, not only the PIC.
Microchip MLA could be simple to use as it will fit easily together with other microchip tools like MCC but at the moment it does not support 8 bit microocntrollers like PIC16F and PIC18F series only 16 bit microcontrollers.
You an try both and see the one that will work for you.
- 05/10/2018 at 21:01 #3643
Does anyone have a minimal MPLAB X project for either a PIC24 or PIC18 that he/she is willing to share?
I have looked at the PIC24 sample in the distribution but it is source code only – not a project – so I am not sure what files need to be included in the project nor which ones to modify for my processor.
- 05/10/2018 at 22:49 #3644
There is a simple project using PIC18F in this article: http://www.studentcompanion.co.za/interfacing-sd-card-with-pic-microcontroller-xc8/
Or you can watch this video for more info: https://youtu.be/c976a4Fmrps
You must be logged in to reply to this topic.