Help says "Common baud rates range from 110 to 256000. There are equates defined in the WIN32API.INC file, prefixed with %CBR_ to assist you with specifying a common baud rate, but you are not restricted to a limited set of rates." bold added
I need a rate of 40000, but program ignores
COMM SET nComm, BAUD = 40000
and stays at whatever the last standard bit rate setting was.
Results in 9600, 9600, 56000
PB Win 8.04 on XP.
Thanks,
added: Strange other nonstandard values work, like 4123.
added 2: I vaguely remember being able to set the 16X clock divider value via API under Win 98, and getting within 1 or 2% of desired bit rate. Can't find that now in PSDK.
I need a rate of 40000, but program ignores
COMM SET nComm, BAUD = 40000
and stays at whatever the last standard bit rate setting was.
Code:
#compile exe #dim all function pbmain () as long local nComm as dword nComm = freefile open "COM1" as #nComm comm set #nComm, baud = 9600 msgbox str$(comm(#nComm, baud)) comm set #nComm, baud = 40000 msgbox str$(comm(#nComm, baud)) comm set #nComm, baud = 56000 msgbox str$(comm(#nComm, baud)) end function
PB Win 8.04 on XP.
Thanks,
added: Strange other nonstandard values work, like 4123.
added 2: I vaguely remember being able to set the 16X clock divider value via API under Win 98, and getting within 1 or 2% of desired bit rate. Can't find that now in PSDK.
Comment