title: Baud rate limits in software and serial communication with an external device
body: <p>I am using a USB port port operating as a virtual COM port to achieve serial communication with an external device using MATLAB or Visual Basic 6. I am facing baud rate limitations depending on the software I use to communicate with the device. MATLAB (2018a) has no problems because it can set high baud rates. Visual Basic 6 on the other hand faces limitations on the baud rates that can be set in the software. In terms of solutions, I have looked into this to set a higher baud rate in Visual Basic 6: <a href="https://www.mev.co.uk/pages/Support/VB-Baud.html" rel="nofollow noreferrer">https://www.mev.co.uk/pages/Support/VB-Baud.html</a>  </p>
  
  <p>The drivers for the virtual COM port are made by FTDI and can be found here: <a href="http://www.ftdichip.com/Drivers/VCP.htm" rel="nofollow noreferrer">http://www.ftdichip.com/Drivers/VCP.htm</a> . After configuration in the Device Manger, the device I am communicating with appears under 'Ports (COM &amp; LPT)' as 'USB Serial Port (COM4)' in the Device Manager.</p>
  
  <p>The device requires a baud rate of 1000000 and 2 stop bits for successful communication (if you need any more information, please let me know). As far as I am aware, the baud rate set in the software to communicate via the serial port has to be 1000000 to match that of the external device I am using. I think my problem might require a bit an explanation of how serial communication works when a USB port is acting as a virtual COM port because I worry that it differs from communication using a 'real' serial port, if possible. The FTDI driver appears to be very flexible so I do not understand why Visual Basic cannot tap into this flexibility. Is it impossible to set a baud rate of 1000000 in Visual Basic 6? If it is impossible, are there any methods to overcome this limitation?</p>
  
  <p>The VB6 code for baud rate setting is found below, where 'Port' is the address of COM port e.g. COM4, COM3: </p>
  
  <pre><code>MainForm.MSComm1.CommPort = Port
  MainForm.MSComm1.Settings = "9600,N,8,1"
  </code></pre>
  
  <p>If anyone can help me understand how serial communication works in this setting and if I can overcome the constraints of Visual Basic 6, I would be very grateful.</p>