View previous topic :: View next topic |
Author |
Message |
Neddie Guest
|
USB Data transfer |
Posted: Mon Oct 12, 2009 12:29 am |
|
|
Hi to all.
I'm not familiar with USB so please bear with me if I'm asking the obvious.
I'm using the CCS driver (CDC mode) to transfer data from a PC to a PIC18F2455. It seems I can't transfer more that 64 bytes at a time. I can transfer "packets" of 64 bytes one after another but not more than that at a time. Is it possible to transfer larger packets. If I wanted to transfer 10K of data I'd need to transfer 157*64 byte packets which is a bit of a pain.
RAM constraints in the PIC obviously limit the packet size , but I'd like to be able to do more than 64 bytes at a time.
Any tips helpful.
cheers
Rob |
|
![](templates/subSilver/images/spacer.gif) |
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Oct 13, 2009 6:12 am |
|
|
The '2455 only supports low and full speed USB. The maximum packet size depends on the type of transfer taking place - that is, control, interrupt, isochronous, or bulk.
With full speed USB the maximum packet size that you can have is:
64 bytes for control,interrupt and bulk mode transfers; and,
1023 bytes for isochronous transfers.
High speed USB allows:
64 bytes for control and interrupt transfers;
1024 bytes for isochronous transfers; and,
512 bytes for bulk mode transfers.
http://www.beyondlogic.org/usbnutshell/usb4.htm
Rohit |
|
![](templates/subSilver/images/spacer.gif) |
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Oct 13, 2009 6:14 am |
|
|
I forgot to add, USB-CDC is a bulk mode transfer.
Rohit |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Oct 13, 2009 8:28 am |
|
|
I don't exactly understand your problem with CDC packet size. Your sending data as a stream, the USB driver takes care of splitting your transmission request to multiple packets. What's the data source for your 10k? |
|
![](templates/subSilver/images/spacer.gif) |
|