Gary,
AFAIK you would need some kind of system driver to achieve what you stated. But I might have a misunderstanding here.
You know, this 1ms timing resolution you mentioned is the smallest
timeslice the task scheduler can assign. Every task switch requires a
context switch, wich unloads the complete context of the old task and
loads the one of the next to the CPU. This requires at least som 10th
of µs, depending on the actual system and memory load and the CPU
speed. If you need a higher (e.g. better) timing resolution you
either need both serial port accesses within one single task (which
implies the serialised acces, where the call to the 2nd process can
start when the call to the 1st port has finished) or you need a system
driver which does not rely on the task scheduler and usually runs with
higher priority. Writing such drivers is a really complicated process -
specialists charge some 10th of thousends of $$$. A third alternative
is using a real time OS.
You know, serial port access is typically used asynchrounuosly. Your
application sends some kind of data to a system buffer and calls the
systems serial driver. This one takes a part of your data, copies it to
the UART chip and starts its sending process. The UART sets an
interrupt when its buffer is allmost empty, which makes the system
serial driver to refill the UART buffer. When all data is sent, this
UART interupt is changed to a notification, which can be read on the
application level and used as a notification that all data has been
send. You can of course start two of those processes, but the second
can just be started when the first call had been returned. And AFAIK it
returns when the first data is in the UART. So thats the delay you
measured. I am not aware of any means to delay the first system serial
driver or the UART until all others have been prepared and to start all
drivers instances in parallel.
Greetings from Germany!<br>-- <br>Uwe