On Mon, Dec 21, 2009 at 9:03 AM, Tony Vandiver wrote: > Hi Andrew, > > =A0 =A0Basing time on the file creation time is a good idea - any idea how > many files I can create with this FAT version? =A0I've seen some comments > about a max of 256, but this seems a little restrictive. I'm not sure about the maximum number of files for that implementation. I wasn't suggesting using file creation time(though you could use that), but creating a file format for your protcol sniffer that would use a time stamp that is relative to a time marker. You could use a one/two byte time difference that went something like: one byte: the AND mask would be 0x7F, values available from 0 - 127 (Use 2byte for values > 127) being increments of 1/10 seconds, 10's milliseconds, 1/10 milliseconds, or whatever you desire. two byte: check if value < 32768 (might need a method to log a whole timestamp if its greater), you use an OR mask of 0x8000 but AND with 0x7FFF when calculating time difference for display. So essentially when you read the file (I'm assuming its not a text file your writing), you have your program look at the MSB of the first byte and if its a 0 the relative timestamp is one byte, if its a 1 its a two byte relative timestamp. Could expand to be 2 bits for the timestamp description and you would have a way to put in 6 bit and 14 bit relative timestamps as well as two other types, which could include the whole timestamp or a longer relative timestamp. HTH Andrew > Thanks, > > Tony -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist