mmc fat write problem
-
- Posts: 3
- Joined: 22 Feb 2011 20:19
mmc fat write problem
hi , i want to make txt file on mmc (fat16) , I want to send special key to txt file such as ( enter key to make newline) and (tabe key to separate bt words) , i make the file and send characters to it but i cannot make newline or separate tab bt words . can you help me plz.
-
- Posts: 3
- Joined: 22 Feb 2011 20:19
Re: mmc fat write problem
i need write fat16 code plz
Re: mmc fat write problem
Hi,
Please, look at the MMC FAT16 example provided by the compiler.
I'm sure that you will find it very useful.
Regards,
Filip.
Please, look at the MMC FAT16 example provided by the compiler.
I'm sure that you will find it very useful.
Regards,
Filip.
Re: mmc fat write problem
The "newline" is 2 characters: #13 followed by #10, and "tab" is character #9 in an ascii file.waelmoharam wrote:hi , i want to make txt file on mmc (fat16) , I want to send special key to txt file such as ( enter key to make newline) and (tabe key to separate bt words) , i make the file and send characters to it but i cannot make newline or separate tab bt words . can you help me plz.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: mmc fat write problem
Hi, I know this's old thread. I'm doing related FAT16 project.Dany wrote:The "newline" is 2 characters: #13 followed by #10, and "tab" is character #9 in an ascii file.waelmoharam wrote:hi , i want to make txt file on mmc (fat16) , I want to send special key to txt file such as ( enter key to make newline) and (tabe key to separate bt words) , i make the file and send characters to it but i cannot make newline or separate tab bt words . can you help me plz.
May I know how do I write these new lines you mentioned above ASCII codes ?
Is it written as Mmc_Fat_Write("#13#12",6) ? I got incorrect result by doing so.
Re: mmc fat write problem
No, You will have to fill a buffer (array) of 2 chars long with #13 and #10,linspire wrote:Is it written as Mmc_Fat_Write("#13#12",6) ? I got incorrect result by doing so.
Code: Select all
Buffer[0] = #13;
Buffer[1] = #10;
Code: Select all
Mmc_Fat_Write(@buffer, 2);
Probably you can also do
Code: Select all
Mmc_Fat_Write(#13 + #10, 2);
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)