dynamitron
Joined: 18 Mar 2009 Posts: 38
|
sd card and ex_fat.c |
Posted: Tue Apr 06, 2010 4:10 pm |
|
|
I try to use a sd card connected to a 18f2525.
I have tested the hardware with ex_mmcsd.c and I am able to store a value in a memory location and retrieve it to check if it fit with what I set. -> hardware is ok
Next I am trying to use ex_fat.c with no success : the card get initialised ok, I am able to create a file and a directory but when I try to append a file the pic hang up and I need to reset it.
I am using PCWHD 4.065
My config is like this
Code: | #include <18f2525.h>
#device PASS_STRINGS = IN_RAM
#fuses NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP,HS
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#include <stdlib.h> // for atoi32
//media library, a compatable media library is required for FAT.
#use fast_io(c)
#define MMCSD_PIN_SCL PIN_C3 //o
#define MMCSD_PIN_SDI PIN_C4 //i
#define MMCSD_PIN_SDO PIN_C5 //o
#define MMCSD_PIN_SELECT PIN_C2 //o |
Any idea ?
Thanks |
|