I'm trying to develop an RS-232 protocol sniffer that lets a DB9 cable pass through my board and captures all the communication in both directions. I want to log all this data to an onboard USB flash drive, and I'm having trouble coming to terms with something that happens in the FAT implementation. Essentially, around every 32K characters sent (I'm buffering between 400 and 512 bytes per write), the library code blocks for up to 1.2 seconds. I've tracked it down to a call to fsfwrite and then to flushdata, then to USBHostMSDSCSISectorWrite which has this blocking code : while (!USBHostMSDTransferIsComplete( deviceAddress, &errorCode, &byteCount )) { USBTasks(); } So apparently, the library code just blocks while waiting for the mass storage device to complete the data transfer. Does anyone have a suggestion about how to handle this? I'm buffering the incoming characters in interrupts so they don't get lost, but I was hoping to log them to the drive with timestamps, and buffering the timestamp along with every incoming character for 1 second gets pretty cumbersome in terms of ram usage (especially at high monitored baud rates). I know I can work around it for low data rates (I've been trying to think of a relative timestamp that could just be a byte or two per character instead of the whole date time), but I'm wondering if there are better approaches than the Microchip library for this, and also whether anyone has experienced this kind of time delay when logging to flash drives. Thanks, Tony -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist