Re: 1 serial port 2 parity types? MFC based app needs assistance.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Bill Snyder" <bsnyder@xxxxxxxxxxx> wrote in message
news:89at64p4ub4arc6silctf206er3tdrtvfv@xxxxxxxxxx
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.


Thank you Bill. I will look into that. It seems promising.

nappy



--
Bill Snyder [This space unintentionally left blank]


.



Relevant Pages

  • Re: 1 serial port 2 parity types? MFC based app needs assistance.
    ... device sending data while the device is in the wrong mode. ... from the paralell port to switch between tow transmit lines form two ... the port assert DTR when transmitting. ...
    (microsoft.public.vc.mfc)
  • Re: 1 serial port 2 parity types? MFC based app needs assistance.
    ... device sending data while the device is in the wrong mode. ... from the paralell port to switch between tow transmit lines form two ... the port assert DTR when transmitting. ...
    (microsoft.public.vc.mfc)
  • Re: program wont read w/o DTR resistance
    ... > that draw their power from the DTR line). ... > computer and the modified device on a serial line and a resistor ... > low-level going on in either the kernel or the serial port ...
    (comp.os.linux.development.system)
  • Re: program wont read w/o DTR resistance
    ... >> that draw their power from the DTR line). ... > How have you set up the serial port? ... Hey Dave, ... interpret DTR assertion as there being a listening machine onthe other end. ...
    (comp.os.linux.development.system)
  • Re: Keeping the DTR high with Delphi...
    ... >application that has initialized the com port has gone down. ... The handle is private to the App - you can't ... >basically says if the DTR is low for less than 2 seconds for it ... Object and is in fact a sort of device driver ...
    (comp.lang.pascal.delphi.misc)