View previous topic :: View next topic |
Author |
Message |
rikotech8
Joined: 10 Dec 2011 Posts: 376 Location: Sofiq,Bulgariq
|
How do I specify Baud rate on virtual com port? |
Posted: Sun Jan 13, 2013 9:10 am |
|
|
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: 19538
|
|
Posted: Sun Jan 13, 2013 9:31 am |
|
|
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
|
|
Posted: Sun Jan 13, 2013 12:30 pm |
|
|
Aham Ok I see now! Thanks for reply! _________________ A person who never made a mistake never tried anything new. |
|
|
|