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

ex_usb_serial

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



Joined: 18 Nov 2008
Posts: 278
Location: Athens, Greece.

View user's profile Send private message

ex_usb_serial
PostPosted: Sun Oct 18, 2009 8:59 am     Reply with quote

Hello forum!

I used the usb to serial example with success but here is a question.
How can I use handshaking to make the pc wait between transmisions?

There is no CTS here like RS232...


Thanks
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Oct 18, 2009 9:46 am     Reply with quote

CTS isn't needed. The PC stopps sending data, if the TX endpoint buffer isn't emptied at the USB device side.
georpo



Joined: 18 Nov 2008
Posts: 278
Location: Athens, Greece.

View user's profile Send private message

PostPosted: Sun Oct 18, 2009 9:50 am     Reply with quote

This is great news!
So, If I do not "usb_cdc_getc()" then the pc waits till I do. Right?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Oct 18, 2009 11:49 am     Reply with quote

Yes. When the USB device and PC commdriver buffers are full, WriteFile() returns with zero bytes written. It's important not to ignore the WriteFile() result.
georpo



Joined: 18 Nov 2008
Posts: 278
Location: Athens, Greece.

View user's profile Send private message

PostPosted: Sun Oct 18, 2009 12:25 pm     Reply with quote

I am not sure what WriteFile() is. I am using visual basic to send data to the pic through the visual cdc port.
The command is "comport.output=data" I do not think that this returns anything. Any help appreciated!

Something else, how do I know that I am running at full speed? The example is supposed to use internal pullup resistors but I cannot find this anywhere in the code. I tried to send a 100KB file and it needs 100 seconds to finish!
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