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

Writing to an SD card and reading it on a computer
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ckielstra



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

View user's profile Send private message

PostPosted: Sat Mar 31, 2007 5:49 pm     Reply with quote

1) Your spi_setup still contains SPI_SAMPLE_AT_END. Remove this.

2) In sd_write_block() you have
Code:
Status=SPI_READ(0);
Your previous version used 0xFF as a parameter which was correct. Fix this.

3) It still doesn't look like you are sending 8 dummy clocks between all commands. Have the data_out line high when sending the dummy clocks.

A summary drawing of the most important timing diagrams that was very helpfull to me can be found on the internet with different names. Here is just one location I stumbled upon: http://ulrichradig.de/site/atmel/avr_mmcsd/pdf/MMCSDTimming.pdf
nibbel
Guest







question
PostPosted: Sun Apr 01, 2007 3:44 am     Reply with quote

hi!

i am from austria and and go to a higher technical school for working people.

i have a project like u. we wants to save data into a file on a sd-card.

where do u define the file in your programm?

maybe u want to send me your file.

nibbel23@hotmail.com

yours rudi from austria
EdWaugh



Joined: 07 Dec 2004
Posts: 127
Location: Southampton, UK

View user's profile Send private message

hey
PostPosted: Wed Apr 04, 2007 5:22 am     Reply with quote

Hi guys,

I'd just like to apologise for that really old mmc writing code of mine turning up on this forum yet again! I would also like to say that it definately does work even with the odd bug, especially the one in the setup SPI line. I accessed the registers directly as I think at the time CCS didn't support the options I needed to set, this was quite a few years ago...

cheers

ed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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