This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Writing files with 8051

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'd really appreciate some sort of #include file or anything that lets me have access to functions such as fprintf and fscanf, fopen, fclose. Also if anyone can tell me weather FATfs (elm-chan.org/.../00index_e.html) files are ok to compile on a 8051.

Parents
  • The purpose of this forum is to discuss Keil tools & products - not to give free consultancy.

    See: http://www.keil.com/forum/

    If you want a consultant to help you with your project, try: http://www.keil.com/condb.

    "You ask me 'new to what exactly'"

    That is a perfectly reasonable question.
    Remember that nobody knows anything about you or your experience other than what you clearly and explicitly state in your posts.

    In particular, we don't know if you are:
    new to any form of programming;
    new to the 'C' language;
    new to embedded systems;
    new to the 8051;
    new to dealing with file systems;
    etc, etc,...

    "I clearly explain what I have difficulties with ("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.)"

    No, that is not clear at all!

    "I do not understand how many of the functions included in ff.c are useful..."

    You keep saying you don't understand, but you have given no indication of having read any of the documentation at elm-chan.org/.../00index_e.html
    Each of the functions has a page documenting it, and many examples are available both on that site and elsewhere on the interweb.

    " 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."

    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't worry about it!

    "I would appreciate if someone who actually had to create some sort of "movable medium" (larger than 1MB) between a PC and 8051 offered insight"

    You should be able to find examples on the web; if you want someone to dedicate time specifically to doing it for you, that's a consultancy job.

    Note that there are many low-cost development boards that come complete with an SD-Card socket & examples. If you want something "ready-to-go", that might be your best option...

Reply
  • The purpose of this forum is to discuss Keil tools & products - not to give free consultancy.

    See: http://www.keil.com/forum/

    If you want a consultant to help you with your project, try: http://www.keil.com/condb.

    "You ask me 'new to what exactly'"

    That is a perfectly reasonable question.
    Remember that nobody knows anything about you or your experience other than what you clearly and explicitly state in your posts.

    In particular, we don't know if you are:
    new to any form of programming;
    new to the 'C' language;
    new to embedded systems;
    new to the 8051;
    new to dealing with file systems;
    etc, etc,...

    "I clearly explain what I have difficulties with ("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.)"

    No, that is not clear at all!

    "I do not understand how many of the functions included in ff.c are useful..."

    You keep saying you don't understand, but you have given no indication of having read any of the documentation at elm-chan.org/.../00index_e.html
    Each of the functions has a page documenting it, and many examples are available both on that site and elsewhere on the interweb.

    " 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."

    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't worry about it!

    "I would appreciate if someone who actually had to create some sort of "movable medium" (larger than 1MB) between a PC and 8051 offered insight"

    You should be able to find examples on the web; if you want someone to dedicate time specifically to doing it for you, that's a consultancy job.

    Note that there are many low-cost development boards that come complete with an SD-Card socket & examples. If you want something "ready-to-go", that might be your best option...

Children