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 CCS Technical Support

How do I specify Baud rate on virtual com port?

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



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

How do I specify Baud rate on virtual com port?
PostPosted: Sun Jan 13, 2013 9:10 am     Reply with quote

I have PIC18F4550 and I made a program related with CDC USB Device which represents virtual serial com port. My question is: How the device Baud rate is defined to the PIC. In other words, is that possible to alter the USB_CDC device Baud rate? After all, does the Baud matter?
_________________
A person who never made a mistake never tried anything new.
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sun Jan 13, 2013 9:31 am     Reply with quote

Basically it doesn't matter.

You would never specify the speed.

The PC though can send commands to your device specifying the speed, and if (for instance) the data was then going to a 'real' com port on your device, you would then need to change the speed of this to match.

The structure usb_cdc_line_coding in the CCS code, contains the setting received from the PC.

usb_cdc_line_coding.dwDTERrate

is the baud rate the PC has set, in bits per second.

Best Wishes
rikotech8



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

PostPosted: Sun Jan 13, 2013 12:30 pm     Reply with quote

Aham Ok I see now! Thanks for reply!
_________________
A person who never made a mistake never tried anything new.
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