Serial port and USB
-
Hi all Am familiar with serial port communication in VC++. I have written a software for connecting a datalogger device into the serial port and reading the data from the device. Now I want to make this device and software able to be connected to the USB port, since most the laptops have only USB. Please help me regarding how I can start sending and recieving data via the USB port in windows. The Best Relligion is Science. Once you understand it, you will know God.
-
Hi all Am familiar with serial port communication in VC++. I have written a software for connecting a datalogger device into the serial port and reading the data from the device. Now I want to make this device and software able to be connected to the USB port, since most the laptops have only USB. Please help me regarding how I can start sending and recieving data via the USB port in windows. The Best Relligion is Science. Once you understand it, you will know God.
If using a standard USB to serial convertor your code "should" work just fine using the COMx port installed by the driver (usually COM3 or higher), however the USB serial ports so not act quite the same as UART based serial ports, in particular they tend to appear "blockier" (data arrives in distinct blocks rather than in a more continual stream). I have found that this can interfere with the expected action, particularly the timing of serial messages. If you want to add the USB port to the actual datalogger hardware I suggest you look at something like the CP2102 (Silicon Laboratories). This is a very small IC that can easily be added to your product and converts from serial to USB (no crystal required which keeps the cost down).
-
If using a standard USB to serial convertor your code "should" work just fine using the COMx port installed by the driver (usually COM3 or higher), however the USB serial ports so not act quite the same as UART based serial ports, in particular they tend to appear "blockier" (data arrives in distinct blocks rather than in a more continual stream). I have found that this can interfere with the expected action, particularly the timing of serial messages. If you want to add the USB port to the actual datalogger hardware I suggest you look at something like the CP2102 (Silicon Laboratories). This is a very small IC that can easily be added to your product and converts from serial to USB (no crystal required which keeps the cost down).
Extreme caution is preserved when using those port converters. I've used some and all of them mananged to blue screen WindowsXP! I've never seen one of those since Windows 98. The problem with those USB serial ports is that most of the drives implement CancelIO wrong and that causes a lot of trouble. More information about this can be found in the CSerial[^] article. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]