fouadalnoor
Member
Hello guys,
I am currently trying to read/write to my sd card using the Petit FatFs System found here:
I am using MPLAB with a PIC18F14K50 to talk to the 8GB MicroSD card using SPI.
I am using the sample code for the pic24 that is given at the bottom of the Petit FatFs website (found under "Resources" on the website ). From what I understand I don't really need to change anything other than the platform dependent macros in the code.
That means, I only need to edit the files: pff.h and and diskio.c to fit my pic18.
Having done that, I still can't write anything to the SD card!
The program seems to be stuck somewhere inside the "disk_initialize" function. I dont use UART and since I am using a PIC18F14K50 I can't debug it using the MPLAB debugger. I have been trying to debug it visually, by turning on an LED on my low pin count development board after a function executes (it enters an infinate while loop).
Can you guys see anything wrong in the code that I have written, because at this point I am out of ideas!
The PIC24 Sample code is attached and my code is attached as well.
Hope you can help!
I am currently trying to read/write to my sd card using the Petit FatFs System found here:
I am using MPLAB with a PIC18F14K50 to talk to the 8GB MicroSD card using SPI.
I am using the sample code for the pic24 that is given at the bottom of the Petit FatFs website (found under "Resources" on the website ). From what I understand I don't really need to change anything other than the platform dependent macros in the code.
That means, I only need to edit the files: pff.h and and diskio.c to fit my pic18.
Having done that, I still can't write anything to the SD card!
The program seems to be stuck somewhere inside the "disk_initialize" function. I dont use UART and since I am using a PIC18F14K50 I can't debug it using the MPLAB debugger. I have been trying to debug it visually, by turning on an LED on my low pin count development board after a function executes (it enters an infinate while loop).
Can you guys see anything wrong in the code that I have written, because at this point I am out of ideas!
The PIC24 Sample code is attached and my code is attached as well.
Hope you can help!
Attachments
Last edited: