THX, Yes your right I would like to do every thing my own, Thx for your codes but as I said before I am amateur in C language so, It's difficult for me to understand your codes so at first for continuing the project I want to make a txt file in the SD card is there any Pdf related to my request in the Internet ? main while is it possible for you, to explain what have done with SD? and after that explain your codes line by line ? I am so confused why there isn't mentioned any thing in the datasheet !!!!!!!!I think U like to do every thing your own, without depending on library...That is good for a hobbyist and some one who is interested to know more about what exactly happening in the background....
Now I think you need to learn about a file system, and it's structure etc (for example FAT) and need to try to write a code for read and write from and to a file system...
I have done an MMC card based wav player, there I did the code for fat reading from MMC. You can see it at my blog link
https://blog.vinu.co.in/2012/02/tv-remote-controller-high-quality.html
Any way I cannot say my code is perfect, but it works fine for me...
---------- Post added at 13:35 ---------- Previous post was at 13:20 ----------
You can check out this link for knowing about FAT file system.
**broken link removed**
THX, Yes your right I would like to do every thing my own, Thx for your codes but as I said before I am amateur in C language so, It's difficult for me to understand your codes so at first for continuing the project I want to make a txt file in the SD card is there any Pdf related to my request in the Internet ? main while is it possible for you, to explain what have done with SD? and after that explain your codes line by line ? I am so confused why there isn't mentioned any thing in the datasheet !!!!!!!!I think U like to do every thing your own, without depending on library...That is good for a hobbyist and some one who is interested to know more about what exactly happening in the background....
Now I think you need to learn about a file system, and it's structure etc (for example FAT) and need to try to write a code for read and write from and to a file system...
I have done an MMC card based wav player, there I did the code for fat reading from MMC. You can see it at my blog link
https://blog.vinu.co.in/2012/02/tv-remote-controller-high-quality.html
Any way I cannot say my code is perfect, but it works fine for me...
---------- Post added at 13:35 ---------- Previous post was at 13:20 ----------
You can check out this link for knowing about FAT file system.
**broken link removed**
MMC/SD data sheets will not contain any thing about writing a *.txt file into it... Because it comes under the section - "file system"....I am so confused why there isn't mentioned any thing in the datasheet !!!!!!!!
Thanks for your guidance, my aim from this project is just for learning basically. Is there any PDF or article that can help me to achieve my intention ? you know I am looking forward to finding the sources of the ready libraries till can realize any thing happen during communicating with SD card.MMC/SD data sheets will not contain any thing about writing a *.txt file into it... Because it comes under the section - "file system"....
There are many file system like FAT, NTFS, EXT3, ETX4 etc etc... It is user choice to select it. Most commonly, FAT (16/32) is used in MMC/SD...
If your intention is to learn things then it's okay, otherwise it will be a time waste to do these low level codings because there will be libraries for these things and people generally depends on those....
Thx for your suggestions and in the next step, making a text file in the SD without using existed libraries I am struggling with some questions:I don't know if some one is already prepared a pdf for exactly writing txt file to SD card with the full explanation for the low level coding...
In my case, I learned about fat from this link **broken link removed**
Then I tried to access a file system on the MMC card, I read first sector (boot sector) and from there I get some important data like fat start, sector/cluster, root directory start, data start etc etc and so on...
So, you can try the above link and learn about FAT16 now. Then format your SD with FAT16 and try to read the first sector (sector 0) to a buffer and find the importand stuff which u learned from the link provided.... This is the way I followed...
Reading a data from a filesystem is easier than writing . So at first just write data from compurer and try to read it using ur own code...
In that link, start from the "FAT16 Boot Record" section and just skip those first few topics like partition etc because you don't need it in your case...
[Also, it will be better if you post your working initialization code here,because it may be helpful for others....]
Thx for your suggestions and in the next step, making a text file in the SD without using existed libraries I am struggling with some questions:
1- what are the parts of the a text file ?and where is the place that information related to a txt file are stored ? I mean the full details
2- what is the relationship between a txt file and the SD card format ? is there any logical relationship ?
3- I opened my SD memory in the "winhex" software and there are lots of vague codes that I can't understand them but I think they involve the TXT file information so I want to know do you have any advice for finding the meaning of them ? here is some of them : have a look plz View attachment 72298
4- according to the datasheet of the SD there are "block" and "sector" and the size of block is depends on commands and the size of sectors usually is 512 bytes, in your link there is a new unite that has called "cluster" and I didn't get how much is the capacity of cluster . do you know ?
5- could you please guide me more that for achieving my aim "making a txt file in the SD " how can I use your link ?
at last about your request for my source code, It's Ok but at first I should finish my project as you know more than one month is passing and I am struggling with this project and right after I finish it I put an article related to my achievement.
The parts of a TXT file:1- what are the parts of the a text file ?and where is the place that information related to a txt file are stored ?
See (*).I mean the full details
There is absolutely no relation between the txt file format and the SD card format. That's why you can also2- what is the relationship between a txt file and the SD card format ? is there any logical relationship ?
If you want to understand the contents of what you see in winhex, please refer to (*) hereafter.3- I opened my SD memory in the "winhex" software and there are lots of vague codes that I can't
understand them but I think they involve the TXT file information so I want to know do you have any
advice for finding the meaning of them ? here is some of them : have a look plz
Just a question: do you read the documents that other people post? In the link vinodstanur posted, there4- according to the datasheet of the SD there are "block" and "sector" and the size of block is depends on
commands and the size of sectors usually is 512 bytes, in your link there is a new unite that has called
"cluster" and I didn't get how much is the capacity of cluster . do you know ?
Your question is too wide. There is too much to do to reply in a single post. Start by writing your code,5- could you please guide me more that for achieving my aim "making a txt file in the SD " how can I
use your link ? at last about your request for my source code, It's Ok but at first I should finish my project
as you know more than one month is passing and I am struggling with this project and right after I finish
it I put an article related to my achievement.
Yes I agree with you, but I am confusing because I don't how should I start for writing a txt file in the SD, I followed the link of vinodstanur that was good but in frankly speaking I don't know how should I use it ? which information should I pick up from that ????? Do you have any advice ?Writing a text file to a SD card isn't different from writing a binary file.
I followed the link of vinodstanur that was good but in frankly speaking
I don't know how should I use it ? which information should I pick up from that ?????
Thx every body, till now I could find the 32 byte related to file specification such
as date and time and so on but when I look the root directory there are more than 32
byte related to a txt file and I don't know what are they ? please look at the picture
untitled.bmp and answer me as soon as possible
Once you have read all that stuff, calculate the first sector ID of the first andHello!
0E: reserved clusters: 0x0022 : 2 x 16 + 2 = 34 reserved sectors
Now exercise:
- Once you have read all that stuff, calculate the first sector ID of the first and
second FAT tables.
- Calculate the first sector iD of the root.
- Calculate the fist sector ID of the first data cluster
Hint : use the table FAT2 drive layout.
Dora.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?