- changing the serial port rate on a USB port does not change the transmission rate. USB operates at a fixed speed. The serial port setting is sometimes used to estimate the resource buffering priority, but the USB clock speed and packet size stays constant.
- for true rs232 or rs422 or rs485 or TTL, there is nothing in the protocol that communicates transmission speed. If the two sides do not agree on transmission speed, then the receiver experiences framing errors. With proper hardware access and the agreement of both sides, it is possible to have an auto negotiation protocol in which a receiver experiencing framing errors guesses that it needs to switch to the next speed in sequence until eventually it gets something that it can recognize. However, matlab has not had access to that hardware level since early in Windows XP days. I would not rule out the possibility that it could still be done by finding an appropriate driver or operating system call, but it would not be simple.
Real term baud rate should be captured/ read by MATLAB
6 views (last 30 days)
I have interfaced Real term and MATLAB. Now I want to change baud rate of real term form its drop down menu and that baud rate should be captured or read by MATLAB. MATLAB communcation port should also operate on the baud rate that I have selected from realterm. Is this possible ?
Walter Roberson on 19 Feb 2023
Edited: Walter Roberson on 19 Feb 2023
If you mean that you are using activex or .NET facilities to control a Realterm process from within matlab, then I do not know if it is possible for matlab to be notified when the baud rate changes. Maybe? activex controls do sometimes allow callbacks, so I cannot rule it out at the moment even if I doubt that particular facility would have been developed.
If, however, what you mean is that you are using Realterm on a second host, and are connecting the second host to a matlab session through rs232 or serial over USB cable then:
Speed negotiation is a lot easier if the protocol is to start at the lowest mutually supported rate, and then for the software to communicate a list of supported speeds, and then the remote host sends a software command requesting to switch rates.