Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: readin USB thumb drive and USB keyboards

2005-07-21 by Jesper Hansen

>> > By the time you get as far as having all the code to read and write
>> > FAT and FAT32, I'm not sure if I'd call it "simple" anymore
>> -- we're
>> > talking thousands of lines of code!  But I agree that getting USB
>> > talking to a single peripheral is significantly simpler
>> than a general
>> > purpose USB stack.
>>
>> Thousands of lines ? Not at all. I've been working with FAT
>> for years, and it's not that complex.
>
> For top-level directories only, I would agree that reading and writing
> is not complex.  And it's even easier if you limit your partitions to
> use FAT12 or FAT16 only.  And it's even smaller if you limit your
> physical device to less than 32MB in total.
>
>> I even have a FAT capable bootloader in a mega8 ! About 750
>> bytes complete with CF card driver, programming and support routines.
>
> This would be a read-only system, though, with both FAT12 or FAT16
> support but not both, and probably limited to only reading files in the
> root directrory?  I can't see a complete FAT filing system in 750 bytes
> of code on an AVR.  I think Gus' code is a full file system, not a
> cut-down one and therein lies the difference.

It's obviously a reduced system, it's a FAT16/FAT32, read-only, short
filenames only and no directory handling, but it shows that FAT really
isn't that complex.
I have a full FAT16/FAT32 read/write system, with directory support and
long filenames that is just about 10-15K, and it includes fopen/fclose 
e.t.c.
support.

/J

> --
> Paul Curtis, Rowley Associates Ltd  http://www.rowley.co.uk
> CrossWorks for MSP430, ARM, AVR and now MAXQ processors

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.