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.

FAT32 Reading/Writing with 8051: how?

Status
Not open for further replies.

cbsirio

Member level 3
Joined
Jan 5, 2003
Messages
64
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
721
Hi all,
I have to read/write files to an harddisk connected to a 8051 uP.

The hard disk is formatted in FAT32.

I was searching for "C" source (no asm) to read/WRITE files in this device...

Can someone help me ?

Many thanks in advance.

Sirio.
 

Hi,

That question was here before, may be it will be usefull:

**broken link removed**

73! klug.
 

FAT32 ....
8051 has to compute 4 bytes arithmetic.
U may check cpu power that can be or not....
 

Klug: Thank you, but the link you posted have only "asm" reference... :oops:
I was searching for "C" source library or piece of code to extract them.


Year: I have no to hurry up... :) I have enough time to make the necessary calculations: I need about 10 kb/s of speed ...

Thanks again, Sirio.
 

And One More...

And also needs lots of SRAM to handle file read and write because of FAT size, as far as I know.

Please check MS home page and DDK...
 

HI:
Check out this site. Its based on AVR microcontrollers. Again this will prove to be a good starting point.

**broken link removed**

You can go thru the C code in the download sections...

Binny
 

I saw the web...
Very good sample to learn. I agree.

But writing function is not easy at HDD.
Anyway, you will know after you do...

These are points
- MBR
- PBS
- ROOT DIRECTORY ENTRY
- FAT1, FAT2 area
- LONG FILE NAME
- SUB DIRECORY(FOLDER)
- SUB DIECORY ENTRY

WINHEX is good tool to know FAT file system.
 

Very very nice! :)

And also, I have found a very nice document about FAT32, as suggested from "year" on microsoft site!

**broken link removed**

And I also see the two links posted ! Great!!

Many thanks to all... It's WORK time now! :wink:

Bye! Sirio
 

Hi cbsirio,

Now you seems like finding right way.

OK, that is not easy but can not be impossible...

Be success.
 

Hi all,

There is an on-going project described in an article (Circuit Cellar, Issue 150). The title is " Construct an ATA Hard Drive Controller". I believe that the author (Fred Eady) mentioned about FAT16, FAT32 read/write in his article. This article may be a good starting point for your project. Unfortunately, the microcontroller used in this project is ATmega128 (not your favorite 8051s :) ). However, the source code is written in C-language. I think that it should be easy to port this code to 8051 MCUs.

Hope this helps.
 

Hello Dspnut,

Excuse me for my question ... but what is Circuit Cellar ? :(

I know Electronic Express, but I have no idea on what is this... Is a periodic?
How can I find it ?

It seems to be very interesting, so, can you be more specific, please? :sm7:

Thank you!!

Again ... thanks all! :sm9:
 

Hi..cbsirio :)

Circuit Cellar is a (IMHO) very popular electronic and embedded system magazine. You can read some online articles here at

https://www.circuitcellar.com

Also look around in the MCU fileman.... :wink:
 

Hi..all,
In case that someone may want to take a look at the souce-code of the "Construct an ATA Hard Drive Controller" project. Here is the attached code (sorry no schematics :cry: ). Please keep in mind that this is an on-going project. So you will find that this source code is not yet completed. Let's wait for Mr. Fred Eady to publish his new article. :D
 

Look Ethernu project:
h**p://w*w.ethernut.de/en/index.html

Added: Cool IDE diskdrive and Compact Flash interface done by Michael Fischer. Supports FAT32 with long filenames
 

Hi,

Look this, may be work:)

h**p://www.ucos-ii.com/contents/products/file_system.html
 

tcsa35 said:
Hi,

Look this, may be work:)

h**p://www.ucos-ii.com/contents/products/file_system.html

There is only available trial library without source code for:
"From this page you will be able to download a Visual C++ compiled library and sample code for the Windows environment"
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top