View previous topic :: View next topic |
Author |
Message |
Chen Guest
|
Any one have some sample codes to interface with CF or MMC f |
Posted: Wed Feb 05, 2003 12:57 pm |
|
|
___________________________
This message was ported from CCS's old forum
Original Post ID: 11308 |
|
|
chas Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Wed Feb 05, 2003 3:37 pm |
|
|
:=
Check the link below for an article on the subject.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11317 |
|
|
Pete Smith Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Thu Feb 06, 2003 2:51 am |
|
|
If you do a search on this board for MMC, there have been plenty of questions asked.
Someone (Tomi?) has successfully interfaced a PIC to an MMC card, using it as flat storage. I'm actually working on something similar myself, but implementing FAT16 (very basic) so I can store large amounts (64Mb) of data, and then read it into a PC using a USB reader.
There's also masses of data out there on the 'net about interfacing MMC cards, and a bit on MMC cards to PICs.
HTH
Pete.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11335 |
|
|
Tomi Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Thu Feb 06, 2003 4:09 am |
|
|
I think Chang-Huei Wu did it. See the link below :)
:=I'm actually working on something similar myself, but implementing FAT16 (very basic) so I can store large amounts (64Mb) of data, and then read it into a PC using a USB reader.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11336 |
|
|
John Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Thu Feb 06, 2003 5:22 am |
|
|
Post your e-mail adress and I can mail you the complete files made by C-H Wu based on Tomi's code.
/John
___________________________
This message was ported from CCS's old forum
Original Post ID: 11340 |
|
|
Chen Guest
|
Thanks |
Posted: Thu Feb 06, 2003 8:04 am |
|
|
___________________________
This message was ported from CCS's old forum
Original Post ID: 11346 |
|
|
Chen Guest
|
Here, thanks! |
Posted: Thu Feb 06, 2003 8:05 am |
|
|
chen@dataq.com
___________________________
This message was ported from CCS's old forum
Original Post ID: 11347 |
|
|
Chen Guest
|
Thanks! |
Posted: Thu Feb 06, 2003 8:09 am |
|
|
___________________________
This message was ported from CCS's old forum
Original Post ID: 11352 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Any one have some sample codes... |
Posted: Thu Feb 06, 2003 2:49 pm |
|
|
<font face="Courier New" size=-1>:=I think Chang-Huei Wu did it.
---------------------------------------------------------
That code listing doesn't display properly, because some
"less than" symbols are seen as html tags by this board.
For example, in the mmc_read_flush() function, the "for" loop
is missing several statements. You can see that if you use
your browser to "view document source".
He needs to edit that post, and use the html tags, PRE and /PRE.
These tags allow C code to be posted accurately on this board.
Here are some links on the PRE tag:
<a href="http://www.createafreewebsite.net/html_tutorial/pre_tag.html" TARGET="_blank"> <a href="http://www.createafreewebsite.net/html_tutorial/pre_tag.html" TARGET="_blank">http://www.createafreewebsite.net/html_tutorial/pre_tag.html</a></a>
Here is an online demo that allows you to play around with
the PRE tag and see the results:
<a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_pre" TARGET="_blank"> <a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_pre" TARGET="_blank">http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_pre</a></a>
This board doesn't work exactly like that demo.
This board seems to remove blank lines when you use the PRE tag.
So I have to use the BR tag to put them back in.
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 11373 |
|
|
Pete Smith Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Thu Feb 06, 2003 3:45 pm |
|
|
:=I think Chang-Huei Wu did it. See the link below <img src="http://www.ccsinfo.com/pix/forum/smile.gif" border="0">
:=
:=:=I'm actually working on something similar myself, but implementing FAT16 (very basic) so I can store large amounts (64Mb) of data, and then read it into a PC using a USB reader.
Damn! I thought your code was handy (09/09/2002). For some reason, I never saw the last part of this thread (think I was still on holiday).
I'm looking forward to trying this code out! Once I've done that, I just have to write the FAT16 code :-/
I'll share it around once it works though.
Pete.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11375 |
|
|
Chang-Huei Wu Guest
|
MMC for PIC with USB reader |
Posted: Sat Feb 08, 2003 11:53 pm |
|
|
:=I'm looking forward to trying this code out! Once I've done that, I just have to write the FAT16 code :-/
:=
:=I'll share it around once it works though.
:=
:=Pete.
I don't know much about the FAT16, but, FAT16 code might not be necessary, I took the following steps:
1. format the MMC with DOS command for FAT16 and 2048 bytes per cluster
(with MMC in USB reader as removable disk F:)
format F: /FS:FAT /A:2048 /V:MMC_32MB
if you got total a total space of 32,030,720 bytes and 15,640 clusters, then the starting address of your first file will be 0x00013a00
2. copy a dummy file of EXACTLY 1 MB into the MMC, say dummy_1.dat, 1048576 bytes = 2048 x 512 = 0x00100000, then, dummy_1.dat will start from 0x00013a00, and the next file will start from 0x00113a00
3. connect the MMC with you PIC, writing data from 0x00013a00 with the following initiate command, mmc_open_4_write(0x00, 0x01, 0x3a); keep writing upto 1 MB of data.
4. put the MMC back to USB reader, then you can get your data back by simply copy dummy_1.dat back.
That's all.
Best wishes
C-H Wu
___________________________
This message was ported from CCS's old forum
Original Post ID: 11439 |
|
|
Richard Rolland Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Fri Mar 14, 2003 1:06 pm |
|
|
Hi, I am trying to do the same thing using a micro-controller to interface the CF card. I trying to find out the easiest way to create a file and append data to it. Did you have good success?
:=I think Chang-Huei Wu did it. See the link below <img src="http://www.ccsinfo.com/pix/forum/smile.gif" border="0">
:=
:=:=I'm actually working on something similar myself, but implementing FAT16 (very basic) so I can store large amounts (64Mb) of data, and then read it into a PC using a USB reader.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12676 |
|
|
vinash
Joined: 06 Feb 2006 Posts: 2
|
help needed |
Posted: Thu Feb 09, 2006 3:01 am |
|
|
I am trying to interface a sd card to a micro-controller and implementing FAT16. If some has a code, I would be very grateful, if you could send it to me.My e-mail add is vinash123@hotmail.com.thank you. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Feb 09, 2006 8:09 am |
|
|
Use the search function of this forum before posting a question. You will get your answer much quicker and it saves us from reading the same questions over and over again. |
|
|
subodh Guest
|
Re: Any one have some sample codes to interface with CF or M |
Posted: Sun Feb 11, 2007 12:21 am |
|
|
John wrote: | Post your e-mail adress and I can mail you the complete files made by C-H Wu based on Tomi's code.
/John
___________________________
This message was ported from CCS's old forum
Original Post ID: 11340 |
Can you send me this code on subodh1978@yahoo.com
Thanks
Subodh |
|
|
|