CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

How to make SD Card example work ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
DiegoGarcia



Joined: 01 Mar 2008
Posts: 48

View user's profile Send private message

How to make SD Card example work ?
PostPosted: Sat Mar 15, 2008 2:45 pm     Reply with quote

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
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sat Mar 15, 2008 3:15 pm     Reply with quote

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?
DiegoGarcia



Joined: 01 Mar 2008
Posts: 48

View user's profile Send private message

PostPosted: Sat Mar 15, 2008 3:27 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group