Article View: borland.public.cppbuilder.nativeapi
Article #4840Re: RTS_CONTROL_TOGGLE
From: Steve Aletto
Date: Wed, 16 Nov 2005 12:48
Date: Wed, 16 Nov 2005 12:48
28 lines
2062 bytes
2062 bytes
> As next step i tried using WaitCommEvent and its relatives > (using EV_TXEMPTY) > causing the result, that the process returns in the middle of > the transmittion > process and not at its end as described:"EV_TXEMPTY The last > character in the > output buffer was sent." The behaviour is correct. The output buffer IS NOT the output register. You can have, for example, a 16-byte output buffer. Furthermore, a byte requires time to be "serialized" once it is read from the register. So you can't base the control on that event, unless you set the output buffer length to 1 and as soon as you receive the event, wait for the last byte to be shifted out and then drop RTS. But not always this trick works properly. > So I not able to control the RTS line in a suitable way. Have you evaluated the possibility of using an automatic 232/485 converter? > Does anybody has a solution for this problem. It's one of the most difficult issues in serial communications I ever faced and I'm still looking for a good software solutions as well. Steve.
Technical Details
Message-ID:
<437b2a8b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<437b1cd2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fcae495b335d855 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Steve Aletto" <stevealettoANTI@SPAMgmail.com> From: "Steve Aletto" <stevealettoANTI@SPAMgmail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <437b1cd2$1@newsgroups.borland.com> Subject: Re: RTS_CONTROL_TOGGLE Date: Wed, 16 Nov 2005 13:48:58 +0100 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 81.208.124.114 Message-ID: <437b2a8b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1132145291 81.208.124.114 (16 Nov 2005 04:48:11 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail