View previous topic :: View next topic |
Author |
Message |
DiegoGarcia
Joined: 01 Mar 2008 Posts: 48
|
How to make SD Card example work ? |
Posted: Sat Mar 15, 2008 2:45 pm |
|
|
Hi guys its me again ;)
Now I'm trying to use an sd card, I just have to write some date inside it and read it when necessary.
It doesnt have to write in any fat format just write it the data that could be read after ... Becuse the fat implementation takes a lot of ram from pic and I'm using with the usb so for example I will just read the data from sd when I receive 0x22 from usb hid report. And will write in sd the data when some process of my sistem happens.
The problem is that I'm trying to use the ex_mmcsd.c example from ccs but when the program get into the code
address = gethex();
address = (address<<8)+gethex();
the pic stop to work ... I dont know wy , but I will try to debug it !
But what sugestions can you guys give it to me ?
Regards,
Diego M. Garcia |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Mar 15, 2008 3:15 pm |
|
|
gethex() waits until a character is received on the serial port. If you are not sending anything to the PIC it will wait forever.
I'm not sure what you are trying to do, but maybe you intended to use gethex_usb() from usb_cdc.h? |
|
![](templates/subSilver/images/spacer.gif) |
DiegoGarcia
Joined: 01 Mar 2008 Posts: 48
|
|
Posted: Sat Mar 15, 2008 3:27 pm |
|
|
unhh nice tip ckielstra, I doesnt note that !
Thanks a lot, maybe you could tell me what is the start address of an sd card of 512mb, do you know it ?
Regards,
Diego M. Garcia |
|
![](templates/subSilver/images/spacer.gif) |
|