ok here's are some ideas for you, after glancing through the pic32 manual..= .. 1) if you can reserve a byte value as a end of file marker, just do the=20 pattern match thing. I think you said this wouldn't work. 2) send a fixed length header block which basically contains the length=20 of the next block - I.E. a few byte header. Receive that small header=20 block, parse it, and then configure the dma controller to receive the=20 size block it indicates. In reality, I'd probably just give the DMA block a chunk of memory to=20 work in, and just let it have at it. Treat it as a ring buffer - with=20 the knowlege that you can ignore it for a large chunk of time. Then use=20 the header information to parse out the data. I.E. 0x55 0xAA - header value 0x01 0x00 - data length (0x100 bytes) (0x100 bytes of data here) 0x?? 0x?? - checksum. Once the DMA starts receiving data, the pointers in the DMA module which=20 say where it is going to write is going to change as data is=20 recceived. So, once you see this, you start looking at data from your=20 'start point'. You should find a 0x55, then an 0xaa, then two bytes=20 indiciating the length. once you have this, you can just ignore the DMA=20 until the pointer has moved this far ahead... just poll it every once in=20 a while. You may also be able to do something where you change the dma=20 transfer length on the fly once you have the data which tells you how=20 long the transfer is. -forrest --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .