看来你使用的是MSComm32.ocx,而不是直接使用VB6。
您可以为此设置的最大速度为 256,000 bps。
如何使用Mscomm32.ocx发送到串口 https://support.microsoft.com/en-us/help/139526/how-to-send-to-the-serial-port-by-using-mscomm32-ocx
以下波特率值有效:110、300、600、1200、2400、4800、9600(默认)、14400、19200、28800、38400、56000、57600、115200、128000、256000。
如果您想要更快的速度,请直接使用 Win32 API 和以下库等。
通过Win32 API进行串口编程VB6 https://stackoverflow.com/q/4929414/9014308
串口通讯 http://www.thescarms.com/vbasic/CommIO.aspx
使用 Windows API 在 Visual Basic 上进行串行端口编程 https://strokescribe.com/en/serial-port-vb-winapi.html
grricks/vb6SerialAPI https://github.com/grricks/vb6SerialAPI/blob/master/clsVB6serialAPI.cls
或者,如果FTDI提供的库是像上面的库一样通过Declare Function定义的,可以使用吗?
D2XX 程序员指南 https://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf
6.9 FT_W32_设置通讯状态
Example
FT_HANDLE ftHandle; // setup by FT_W32_CreateFile
FTDCB ftDCB;
if (FT_W32_GetCommState(ftHandle,&ftDCB)) {
// FT_W32_GetCommState ok, device state is in ftDCB
ftDCB.BaudRate = 921600; // Change the baud rate
if (FT_W32_SetCommState(ftHandle,&ftDCB))
; // FT_W32_SetCommState ok
else
; // FT_W32_SetCommState failed
}
else
; // FT_W32_GetCommState failed