CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB Data transfer

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Neddie
Guest







USB Data transfer
PostPosted: Mon Oct 12, 2009 12:29 am     Reply with quote

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
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Tue Oct 13, 2009 6:12 am     Reply with quote

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
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Tue Oct 13, 2009 6:14 am     Reply with quote

I forgot to add, USB-CDC is a bulk mode transfer.

Rohit
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Oct 13, 2009 8:28 am     Reply with quote

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?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group