On 23/12/2010 00:03, Philip Pemberton wrote: > Quick question -- what's the fastest anyone's managed to transfer data > from a PIC18F85J50 to or from a PC, using USB? > > After a heck of a lot of protocol tweaks and the addition of > double-buffering (which netted me another 20 kbytes/sec), I'm up to a > shade under 220 kbytes/sec. Is this about right for a chip with the PLL > on and a core clock of 48MHz? > > The data is being sourced from the Parallel Master Port -- data either > goes from USB to PMP, or the other way. > > The source code is online at http://hg.discferret.com/firmware/ for the > curious. This includes a patch to the Microchip USB Stack which adds a > 'special' string descriptor that reads the device serial number from the > end of the bootloader block of the Flash. > > Thanks, Difficult one - 220K sounds reasonable to me but you could maybe push it=20 a bit faster. ~1MB per sec is the theoretical max with no other bus=20 activity for bulk/isochronous transfers (which you are probably aware=20 of), but in practice much slower. I've seen umpteen discussions on this=20 subject with claims of up to 800K or so, but that's probably with the=20 PIC doing nothing else. Will be looking at similar myself very shortly with my 18F24J50/FPGA=20 board, I need pretty good speeds there - will let you know if I manage=20 anything different. Mind you, if I needed much faster I would probably=20 just use something with high speed capabilities (different MCU or add on=20 a Cypress or FTDI IC) rather than trying to tweak the full speed=20 excessively. Sure Xiaofan would have some good input here.. :-) --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .