• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

FAT16 SDCARD - Microchip Library

Status
Not open for further replies.

cybersky

Member
Hi
Is there anyway to "use" the microchip FAT16 code in oshonsoft? would like to make a proj. that can read a standard text file from an sd card. would like to be able to dev in oshonsoft. and would a pic 16f628 be able to work?

thanx
 

MrAl

Well-Known Member
Most Helpful Member
Hi,

Either of you two guys have a link to the Microchip software app notes or whatever?
 

MrAl

Well-Known Member
Most Helpful Member
Hi Ian,


Thanks for the link. Is there any smaller version on the web or did they mix all their stuff into one box?

It used to be AN1003 but that's not there anymore. It would have been a smaller package.
 

cybersky

Member
Hi Ian
So does this mean i should rather try picbasic ? I can't believe that oshonsoft has no FAT16. Would it be worth the effort to try and "wrap" microchip ASM into functions for oshonsoft? or am i beter off trying picbasic? I can tell you i tried before but oshonsoft is by far the easiest to work with.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I threw all that in the bin..... There are other devices that take care of that mundane stuff..... I use openlog http://proto-pic.co.uk/openlog/?gclid=CL-InffsvrICFeTLtAod3RkAYw

You can use it as a normal sd interface on the usart... Just write to it..... There are a couple of modes.. I use the datalogging mode (default) it appends a text file which can be read on a PC.

There is also VDrive2.... Google it, its about £24...
 

MrAl

Well-Known Member
Most Helpful Member
Hi again Ian,

Since you have some experience with this, can you tell me briefly if there is any code for the lower end devices like 16F (any type not just for the SD card)?
Also, is there code for the 18F for the SD card or just for the 24F series?
Also, how much room does it take up on the hard drive after the install?

Thanks a bunch.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
My full application download.. Including.. Graphics, SD, USB, Image processing...etc... it takes up 214Mb..

Yes there is a pic18Fxxxx SD demo / example... The only pic16f SD/MMC code I've ever found is for raw data use only...

I have tried to use the FAT16 on a small pic16f887... I found a nice SPI Sram 23k256 to hold the cluster and fat array's... But I never finished the project.
There is no reason why it shouldn't work.... It will be a bit slow but functional...

I might raise the project again....
 

MrAl

Well-Known Member
Most Helpful Member
Hello again Ian,


Oh that's very interesting. Maybe i should take a look at the whole package then. 200MB isnt too bad i guess. As long as the install doesnt change anything else.

FAT16 on a pic16F ? Now that is interesting. Yeah i guess you need some slave ram, well that's life i guess. What is the smallest ram size you can use with that?

I'll take a look at it soon. I more or less wanted to look at the protocol they are using to communicate with the SD card, but of course the implementation hardware requirements are a big issue too.

Thanks for all the info so far...
 
Last edited:

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
What is the smallest ram size you can use with that?
Sorry I didn't see the hidden question..... FAT16 requires a 256 byte buffer as the cluster must be read in one.....However!!!..Who's to say when the cluster is read you may only want to use 128 bytes.....I don't know how that will affect a file... You will have to experiment... I would imagine, when read by a PC, there will be BIG spaces of NULL data...

A pic16f887 has 368 bytes of ram.... Theoretically it can be done with VERY subtle uses of the ram available...But there will be no room to do anything else. One thing I haven't tried... Is writing on the fly.... Straight in from uart or SPI, straight out to the filing system.

I find that the little Atmel device "openlog" I really don't need to anymore.

Cheers
 

cybersky

Member
hey guys. Thanks for the info, have decided to use the atmega. has more code samples and codestudio is close to vb for me not to have to learn c! just as a note - found a project using 16f628 as usb I/O device. regards
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top