Quote Originally Posted by Jonathan Orrego
Hi!
I want to make a hobby pc osciloscope using the 18F4550.

I downloaded the EasyHID, tested and works right (i commented the receive routine because i will only transfer data to the pc).

But its too slow....
I implemented a counter in the vb application, the result is that the pbp application generated with easyusb takes 8 secs. to transfer 1000 packets of 8 bytes each.
The stange thing is that if i use easyhid again, but this time i specify 64 bytes per packet, it takes exactly the same ammount of time to transfer 1000 packets of 64 bytes.

1) Is there some PBP code that shows how to configure and use the full or high speed (not HID)?
2) Does the PicBasic instructions USBIn and USBOut works with full or high speed?

Thanks a lot

Jonathan Orrego
Buenos Aires, Argentina

About the USB taking the same amount of time to transfer 8 times the data.......
If I remember my USB particulars right, the internals of the USB fire off an 'event' every 1ms or so. If there's data in the buffer, it gets transferred, if not, no transfer. However, the kicker to this is the internal buffer. If the internal buffer gets filled up before the 1ms timer goes off, it transfers anyways. So, basically, the bigger the blocks, the faster the transfer. Use the biggest blocks you can get away with and fill the extra space with dummy data. Depending on the application, the block size will vary. As an example, I was able to build a USB transferring device using a PIC18F4620 and an FTDI chip. I could easily get over 600KB/second as long as my block size at the PC end was above 4K (give or take, any larger didn't provide any speed gains). But if I set my block size very small, say 64 bytes like you have, the speed dropped dramatically.
Hope this made sense. And like I said earlier, I'm a bit rusty on my USB particulars...
JDG