Serial port reconfiguration.
My goal is to send via serial communication interface one packet of bytes with a slow baud rate (150 baud) and after this, another packet is requested with another baud rate (9600 baud).
To do this I have used this tecnique:
- Open serial port with slow baud rate
- Send the first data characters
- Close serial port
- Reopen serial port with fast baud rate
- Send the seconds data characters
All seems to works fine, but my problem is in the long time required during baud reconfiguration.
I have noticed that function ‘CloseCom(comport)’ takes a long amount of time and this time is related with baud rate.
For example with baud rate of 150 baud the CloseCom() takes about 800msec to finish its task. With 300 baud this time becomes about 400msec.
Thanks very much for any help.
Flavio
(the environment is : CVI=7.0 OS=WIN-XP)