Re: 1 serial port 2 parity types? MFC based app needs assistance.
- From: Bill Snyder <bsnyder@xxxxxxxxxxx>
- Date: Fri, 04 Jul 2008 17:50:51 -0500
On Fri, 04 Jul 2008 17:38:23 -0500, Bill Snyder
<bsnyder@xxxxxxxxxxx> wrote:
On Fri, 4 Jul 2008 10:23:49 -0700, "nappy" <n@xxx> wrote:
Dang. Exactly the problems I had aniticpated. With respect to the remote
device sending data while the device is in the wrong mode.
I am ready to suggest to the client (NAVY subcontractor) that we use a bit
from the paralell port to switch between tow transmit lines form two
different serial ports. Only switch right before you send. Never after. The
receive would always be the same line..
Otherwise I've got to try and use a timer or something? Take the number of
characters being sent and mult times the baud rate with parity and stop bits
added in..
But that is not going to be 100% dependable .. I do not think.
How long does it take Windows to actually start shifting bits out ? Is it
unknown and un knowable?
If you aren't currently using hardware flow control, try having
the port assert DTR when transmitting. Every system I've tried
from Win95 on handles that correctly; DTR doesn't go away until
the last character has actually been transmitted. Then loop DTR
back to DSR or CTS, either of which you can test with
GetCommModemStatus(), or if you're ambitious, set up a callback.
Be advised that Windows isn't necessarily going to *start* sending
the data until well after you've done the write.
Oh, !@#$. I meant RTS, not DTR.
--
Bill Snyder [This space unintentionally left blank]
.
- Follow-Ups:
- References:
- 1 serial port 2 parity types? MFC based app needs assistance.
- From: nappy
- Re: 1 serial port 2 parity types? MFC based app needs assistance.
- From: Joseph M . Newcomer
- Re: 1 serial port 2 parity types? MFC based app needs assistance.
- From: nappy
- Re: 1 serial port 2 parity types? MFC based app needs assistance.
- From: Bill Snyder
- 1 serial port 2 parity types? MFC based app needs assistance.
- Prev by Date: Re: 1 serial port 2 parity types? MFC based app needs assistance.
- Next by Date: Re: 1 serial port 2 parity types? MFC based app needs assistance.
- Previous by thread: Re: 1 serial port 2 parity types? MFC based app needs assistance.
- Next by thread: Re: 1 serial port 2 parity types? MFC based app needs assistance.
- Index(es):
Relevant Pages
|