<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Writing files with 8051</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/27066/writing-files-with-8051</link><description> 
Hello, 

 
I would like some assistance with storing information on a SD card
in the format of a text file. This SD card is connected to a 8051
microcontroller. Communication with the card is done via the SPI. I&amp;#39;d
really appreciate some sort of #include</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/155513?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2011 05:53:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:78b92129-d17e-4699-bfbc-8201399ebf5f</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;pre&gt;
struct
{
whatever else
used
read
}
&lt;/pre&gt;

&lt;p&gt;
if you have no other means of determining which records have been
transferred to the PC, expand as the above&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/155162?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2011 05:23:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f9b17ac7-4417-494c-8bee-39285db0a78a</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;For wear-leveling, it&amp;#39;s possible to use a 2MB memory as a
single ring-buffer where the writes not only contains the
measurements + time stamps but also (if the time stamps aren&amp;#39;t
strictly increasing) record sequence numbers that allows the program
to know where the current position is for read and write&lt;/i&gt;&lt;/p&gt;

&lt;pre&gt;
struct
{
whatever else
used
}
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
set &amp;#39;used&amp;#39; to zero when the place is used (it will be 0xff after
erase)&lt;br /&gt;
at power up transfer first empty to ram&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/154739?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 15:25:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fe468cd0-f30b-4a87-92df-398b4667618a</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
For wear-leveling, it&amp;#39;s possible to use a 2MB memory as a single
ring-buffer where the writes not only contains the measurements +
time stamps but also (if the time stamps aren&amp;#39;t strictly increasing)
record sequence numbers that allows the program to know where the
current position is for read and write.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/154229?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 13:28:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d51484dd-950a-4b66-89c4-4c8138a296f6</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;you cn get directly addressable 2Mbyte flash chips for
&amp;lt;$3&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Depends on the actual volume of data involved - you&amp;#39;d probably
have to look quite hard to find an SD card smaller than 2&lt;b&gt;G&lt;/b&gt;byte
these days!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;no FAT, no ..., no ...&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That&amp;#39;s not exactly true, is it?&lt;/p&gt;

&lt;p&gt;
You will have to devise some scheme for erasing the flash,
determining what space is free, wear levelling, etc, ...&lt;/p&gt;

&lt;p&gt;
You will also have to devise some scheme to get the data off the
embedded device and onto the PC.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/155161?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 12:28:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3b48f5cc-72f7-40fd-a426-59695e2205bf</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://ww1.microchip.com/downloads/en/DeviceDoc/S71243.pdf"&gt;ww1.microchip.com/.../S71243.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
as an example&lt;/p&gt;

&lt;p&gt;
SST (now microchip) has some good chips for this. When I needed to
find a suitable chip for the then purpose, I actually called SST
regarding the chip erase time which for SST is in milliseconds what
others want in seconds.&lt;/p&gt;

&lt;p&gt;
Anyhow the datasheet should tell you all you need to know, BUT be
sure you choose a chip you can get. Code for one flash does not
necessarily work for another flash.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/154741?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 09:53:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1bb66b93-5038-4622-9451-087806070591</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
Also I&amp;#39;d greatly appreciate a link to a site that vendors or
offers further assistance with using such devices. I will search
myself, but if you already know of such a site, please post a link to
it.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/154239?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 09:50:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bfa013f6-d975-4c78-82dd-5dd35b934b3e</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for your answers. I will definitely look into those
flash chips as they seem to be exactly what I need.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/153635?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 08:44:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b46e65dd-bda5-4a60-905b-09559b30ca51</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
you cn get &lt;i&gt;directly addressable&lt;/i&gt; 2Mbyte flash chips for
&amp;lt;$3.&lt;br /&gt;
with data banking it will be a matter of straight writes, no FAT, no
..., no ....&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/152957?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 08:37:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cb147dae-9045-4970-b6f7-3832d1fa9b81</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
The most logical approach for storing your data in case you do not
want to use a memory card with a file system on it, is to use a
SPI-connected EEPROM. They have much simpler SPI protocol than the
SPI protocol used for SD memories.&lt;/p&gt;

&lt;p&gt;
But if you have already fixed the required hw for interfacing with
a SD card, please go ahead with the referenced library. SPI in itself
is not complicated, and it is mainly the SPI that must be mapped from
the original processor.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/152186?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 08:03:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cb56d7ed-310d-4571-af69-ecfa0a1fe117</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
So it sounds like this is a 1-off?&lt;/p&gt;

&lt;p&gt;
Is it a student project?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/152185?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 07:39:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f101505a-dd3b-46c4-92b6-58a87d7ddf3f</guid><dc:creator>IB Shy</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;Since the SD Card part seems to be the big obstacle to you,
why not look for a board that comes complete with SD Card socket
&amp;amp; examples, and work from there...?&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I&amp;#39;d second that. You can go to plenty of on-line stores and buy
really good little STM32 based boards for really small amounts of
money. A lot have SD slots, extra memory, plenty of connectors,
examples etc.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/151429?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 07:28:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:273189db-c361-450d-b724-e72c60d080a1</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
While that is becoming a more and more obvious solution, I&amp;#39;ve only
had experience with the 8051 uC and have already purchased it.
Originally I had hoped for an easy way to add extra storage space to
it as the rest is solvable (interfacing UART and such). The SD
approach was also a suggestion from an aquaintance and I&amp;#39;ve come here
in hopes of finding if there are other more convenient and easy to
implement ways to store data.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/147693?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 07:22:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2a0d9319-9016-484e-a700-3d8b46ef9965</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
What I specifically have to store is a time stamp (from a RTC) and
2 int values every 1 minute for a month, which comes to about
30*24*60 = 43200 entries. Also this has to be versatile enough to be
able to store 4 months or more if the user so desires. This seems too
big for any solution other than a few MB of storage. My focus is
making sense of that data, so any solution ideea that solves the
storage and transfer issues as quickly as possible would be greatly
appreciated.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/150799?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 07:19:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:18958e99-6f26-49dc-88a7-82f820b70047</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
It&amp;#39;s really not that complicated - once ChaN has done most of the
work for you!&lt;/p&gt;

&lt;p&gt;
FatFs gives you just a couple of dozen functions - and, as already
noted, many (most?) of those are not relevant to your simple
application.&lt;/p&gt;

&lt;p&gt;
The functions you requested are there: f_open, f_close, f_write,
f_putc, f_puts, f_printf, etc...&lt;/p&gt;

&lt;p&gt;
If you do it all yourself, you will still end up having to write
equivalent functions anyhow.&lt;/p&gt;

&lt;p&gt;
And you will have to delve into the arcane world of the SD Card
SPI protocol, and implement that yourself.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I need the 8051 (C8051F040 specifically) for its ADC&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
But why an 8051? Plenty of microcontrollers have on-board ADCs
these days!&lt;/p&gt;

&lt;p&gt;
Since the SD Card part seems to be the big obstacle to you, why
not look for a board that comes complete with SD Card socket &amp;amp;
examples, and work from there...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/146684?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 07:09:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4bc86c7f-884f-4b75-aea5-d1529b8c6e2c</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;this micro-controller really doesnt have enough memory to store
1000+ entries in such an array&lt;/i&gt;&lt;br /&gt;
it has (with an external RAM) 64k bytes of data storage&lt;br /&gt;
AND with a bit of trickery I have made a device with a &amp;#39;51 and 2Mbyte
of data storage&lt;/p&gt;

&lt;p&gt;
if that would be enough, you can get (NXP, SILabs, others?) &amp;#39;51
chips with 8kb of internal RAM&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/145090?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 06:10:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b08623b4-c228-4f65-856e-c04c2b9d99a6</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
I would really much rather store data on the SD card without
complications coming from having to figure out FAT32 functions, just
as long as I can later read that data so I can send it to the PC via
UART. Basicly I need the 8051 (C8051F040 specifically) for it&amp;#39;s ADC
convertor. The converted data needs to be stored somewhere so that I
can later access it and download it into a PC for further analysis.
If I would do this on a PC, I would just use a pointer to a struct
and treat that array in a FIFO way. What worries me is that this
micro-controller really doesnt have enough memory to store 1000+
entries in such an array and I would like some tips as to how I can
overcome this problem.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/142880?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 04:46:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8d50ece5-c9f3-460c-bdab-93e22c9e389b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, it is! And not just for an 8051.&lt;/p&gt;

&lt;p&gt;
It is quite a common misapprehension to assume that something
which &lt;i&gt;seems&lt;/i&gt; simple to the casual observer must
&lt;i&gt;&lt;b&gt;be&lt;/b&gt;&lt;/i&gt; simple.&lt;br /&gt;
As the old saying goes, &lt;i&gt;it takes a great deal of effort to make
something appear effortless&lt;/i&gt;!&lt;/p&gt;

&lt;p&gt;
This kind of underestimating is quite common when people are not
familiar with embedded (especially &lt;i&gt;small&lt;/i&gt; embedded) development
- which is why it was important to know what you meant by, &amp;quot;new to
this&amp;quot;.&lt;/p&gt;

&lt;p&gt;
Having said all that, this should not be beyond the capabilities
of a reasonable 8051 - as already noted, it has been done on an
AVR.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;loading data to PC via UART from time to time&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That eases your 8051 development, while putting extra work onto
the PC development. Only you can decide what represents the best
compromise for your particular set of requirements &amp;amp;
constraints...&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I really don&amp;#39;t know if the 8051 has enough memory of it&amp;#39;s
own&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That really on what particular &amp;quot;8051&amp;quot; you are planning to use!&lt;/p&gt;

&lt;p&gt;
There are plenty of non-volatile memories that can easily be
connected to a microcontroller.&lt;/p&gt;

&lt;p&gt;
In the absence of a file systm you will, of course, have to devise
some means of your own for managing the storage...&lt;/p&gt;

&lt;p&gt;
Note that it is possible to use SD Cards as &amp;quot;raw&amp;quot; storage -
without a file system...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/142881?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 04:15:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:58d1685f-2e2c-4ca9-8216-78d982059147</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
It&amp;#39;s possible to store data on a memory card, EEPROM, ... without
the use of any file system.&lt;/p&gt;

&lt;p&gt;
But then it is up to you to figure out how much area you have
filled, so you know where to continue adding data.&lt;/p&gt;

&lt;p&gt;
For memory cards, the controller inside the card normally handles
wear leveling. But you have to take care of any problems with power
losses when you are busy writing data.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/139904?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 04:05:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d8f3a651-5ec7-413b-ae29-fe15c34893f4</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for your replies. It seems that being able to create PC
recognizable files with the 8051 is really a lot of work. I&amp;#39;ll get to
it and maybe look into alternatives (loading data to PC via UART from
time to time would be a viable option, but I really don&amp;#39;t know if the
8051 has enough memory of it&amp;#39;s own to save the 1000+ measurements I
take during a month&amp;#39;s time).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/136474?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 03:56:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c3de76a7-9437-47c3-9d65-8b2131d2d5ff</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
It may sound trivial to append data to a text file.&lt;/p&gt;

&lt;p&gt;
But you need to load the information telling what file system type
you have.&lt;br /&gt;
And you need to locate the root directory.&lt;br /&gt;
And you need to locate individual FAT chains in the FAT tables.&lt;br /&gt;
And you need to find free clusters to append to the FAT chain
whenever the file grows enough that the already mapped clusters are
not enough for the new data.&lt;/p&gt;

&lt;p&gt;
And the need to write back the appended information. And the FAT
chain changes. And any changes to the directory entry/entries
involved.&lt;/p&gt;

&lt;p&gt;
Suddenly, you need quite a number of functions. You might be able
to find &amp;quot;end-user&amp;quot; functions for mkdir/rmdir/delete/rename/... that
you may be able to remove. But the large bulk of functions performs
low-level operations that you normally never have to think about when
your PC accesses and updates files on a floppy or a memory card or
the HDD.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/126818?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 03:35:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:31733396-3b78-4b7d-bdca-43543e8d6d9f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
The purpose of this forum is to discuss &lt;b&gt;Keil&lt;/b&gt; tools &amp;amp;
products - not to give free consultancy.&lt;/p&gt;

&lt;p&gt;
See: &lt;a href="http://www.keil.com/forum/"&gt;http://www.keil.com/forum/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
If you want a consultant to help you with your project, try:
&lt;a href="http://www.keil.com/condb."&gt;http://www.keil.com/condb.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;You ask me &amp;#39;new to what exactly&amp;#39;&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That is a perfectly reasonable question.&lt;br /&gt;
Remember that nobody knows anything about you or your experience
&lt;i&gt;&lt;b&gt;other than&lt;/b&gt;&lt;/i&gt; what you clearly and explicitly state in
your posts.&lt;/p&gt;

&lt;p&gt;
In particular, we don&amp;#39;t know if you are:&lt;br /&gt;
new to any form of programming;&lt;br /&gt;
new to the &amp;#39;C&amp;#39; language;&lt;br /&gt;
new to embedded systems;&lt;br /&gt;
new to the 8051;&lt;br /&gt;
new to dealing with file systems;&lt;br /&gt;
etc, etc,...&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I clearly explain what I have difficulties with (&amp;quot;I really do
not understand some of the functions in ff.c and how they interact
with the SD card (for example if I can simply add my own code to ff.c
and use the defined functions without other complications, aside from
port assignment maybe.)&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
No, that is not clear at all!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I do not understand how many of the functions included in ff.c
are useful...&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
You keep saying you don&amp;#39;t understand, but you have given no
indication of having read any of the documentation at &lt;a href="http://elm-chan.org/fsw/ff/00index_e.html"&gt;elm-chan.org/.../00index_e.html&lt;/a&gt;&lt;br /&gt;

Each of the functions has a page documenting it, and many examples
are available both on that site and elsewhere on the interweb.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot; I do not care about anything else other than being able to
create a windows (xp, 7, vista whatever) recognizable file with an
8051 on a SD card.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Clearly, a general-purpose library such as FatFs is going to
contain more stuff than is going to be needed for any one specific
task. Don&amp;#39;t worry about it!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I would appreciate if someone who actually had to create some
sort of &amp;quot;movable medium&amp;quot; (larger than 1MB) between a PC and 8051
offered insight&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
You should be able to find examples on the web; if you want
someone to dedicate time specifically to doing it for you, that&amp;#39;s a
consultancy job.&lt;/p&gt;

&lt;p&gt;
Note that there are many low-cost development boards that come
complete with an SD-Card socket &amp;amp; examples. If you want something
&amp;quot;ready-to-go&amp;quot;, that might be your best option...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/116347?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2011 03:04:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:99b2dab5-d243-456d-97d1-11d0fb51a86c</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
This thread can now be closed I guess, as there really seems to be
nobody that provides useful information. You ask me &amp;quot;new to what
exactly&amp;quot; when I clearly explain what I have difficulties with (&amp;quot;I
really do not understand some of the functions in ff.c and how they
interact with the SD card (for example if I can simply add my own
code to ff.c and use the defined functions without other
complications, aside from port assignment maybe.)&amp;quot;).&lt;/p&gt;

&lt;p&gt;
I do not understand how many of the functions included in ff.c are
useful for simply creating and appending a string of characters to a
file. I do not care about anything else other than &lt;b&gt;being able to
create a windows (xp, 7, vista whatever) recognizable file with an
8051 on a SD card.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
My goal would be measuring some data for an extended period of
time with the 8051 on the SD card, after which I would copy that data
to my PC for further use. The PC and 8051 cannot be connected for
most of the time (save maybe 30 mins per month), so I had to think of
some way of saving a month&amp;#39;s worth of data, and this is the first
thing I thought about.&lt;/p&gt;

&lt;p&gt;
I would appreciate if someone who actually had to create some sort
of &amp;quot;movable medium&amp;quot; (larger than 1MB) between a PC and 8051 offered
insight. Otherwise just close the topic please and I&amp;#39;ll try to figure
it out.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/104820?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2011 16:57:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4950797b-1ad3-4f34-98bf-b2e29318f4b4</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What says that?&lt;/p&gt;

&lt;p&gt;
According to the online manual, that is not the text for Keil C51
Error C200:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_c200.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_c200.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
What &amp;#39;Object&amp;#39; is it referring to?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I really would appreciate a step by step guide&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Have you studied all the reference materials at &lt;a href="http://elm-chan.org/fsw/ff/00index_e.html"&gt;elm-chan.org/.../00index_e.html&lt;/a&gt;
?&lt;/p&gt;

&lt;p&gt;
It is a pretty widely-used piece of software - lots to find with
google...&lt;/p&gt;

&lt;p&gt;
For specific questions about FatFs, have you tried asking on the
FatFs forum?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I&amp;#39;m new with this&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
New to what, exactly?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/79268?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2011 15:22:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e2466232-dbfa-4374-b8fa-cc04a8a2ab39</guid><dc:creator>Gheorghe Pristavu</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;ve tried compiling ff.c and it says &amp;quot;ERROR C200 IN LINE 1901 OF
ff.c : maximum object size reached (8192 bytes)&amp;quot;. Also I really would
appreciate a step by step guide (IE 1.Get SPI working, 2. FAT32
essential files etc) if possible. I&amp;#39;m new with this and I really do
not understand some of the functions in ff.c and how they interact
with the SD card (for example if I can simply add my own code to ff.c
and use the defined functions without other complications, aside from
port assignment maybe.)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing files with 8051</title><link>https://community.arm.com/thread/66534?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2011 14:14:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:62017b4c-e915-4a2d-a789-ee0db2d20396</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
IF you look at the bottom of that page, you will see that it&amp;#39;s
been done for AVRs - so I see no reason why it shouldn&amp;#39;t be doable on
a suitable 8051.&lt;/p&gt;

&lt;p&gt;
The files are there and free for you to download - so why not just
try it for yourself?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>