Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

89c51ed2 read write byte on SD card. required running code. please please

Status
Not open for further replies.

drbizzarow

Advanced Member level 1
Joined
May 24, 2006
Messages
414
Helped
25
Reputation
50
Reaction score
15
Trophy points
1,298
Activity points
3,662
hii to all,

i want to read/write bytes on SD card in simple way (fat format is optional).
Anybody who successfully interfaced SD card with 8051 architecture please share his code or any useful related link (if any).

their are several example based on AVR and PIC microcontroller on internet but they are not useful for me. i required running code for 8051 architecture.

regards.
 

I have a lightweight and running code for SD Card r/w using SPI with FAT32 but that's on ATmega. You can modify registers and vavlues in SPI related functions or you could provide your own SPI read/write byte function to the code.

www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html

This website has some good stuff regarding FAT32 and SD Card etc. I have used his FAT library and it works without issues.
 

google "8051 sd card"
already done ..... not find any running code ..... also do amendments on some avr and pic codes but useless.

that's why i required running tested code if any.
 
Last edited:

I didn't search for ready-to-run 8051 code, I still suppose it exists. But either if you did find it or not, I don't understand the meaning of the word "useless" in this relation. Does it mean, you don't consider the option of making small changes to an existing code or write a few line of "glue" code, e.g. for the SPI handling on your own?
 

Useless = no results, wasted time.

interfacing SD card is complex matter.
it is better you can use someones tested ready to run code to reduce development time.

if you try to do amendments on someones code to make it your compiler or processor compatible..... it is better to write your own .... THAT'S WHAT I THINK, THAT WHAT I PREFER.

"life is not that simple" you do some simple changes with someones code and it start running on your microcontoller specially in projects like SD card interfacing.

thanks for suggestions.
 
Last edited:

If you're using your own SPI routines then you should be good to use dhrmanitech's FAT32 code, download the example and use it.

I used it in the past and got it working on PIC and AVR both. 8051 shouldn't therefore be a big deal. You just need to change some register names and values and something extra if required depending on your particular MCU's specs. And then you can see it's usage in main.c and create your own main.c file and use that library.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top