🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4114

Serial port management with RTS_TOGGLE

#4114
From: eugenio Monti
Date: Fri, 17 Mar 2006 08:13
23 lines
1891 bytes
I have an application developed with C++Builder6 that manages
a serial protocol with external devices on a RS485 bus.
It manages a COM device using Windows API.
The way to enable the TX section of RS485 transceiver is
drive the RTS signal, so I used the SetCommState API setting
the fRtsControl field of DCB to RTS_TOGGLE value.
This approach works fine in any PC I tried from Windows95
to WinXP.
I have a problem on a DELL notebook with WinXP SP2 and CENTRINO processor.
My application sends a frame but RTS signal remains high for 15 ms.
instead of 1-2 ms.!!!!!
I tried to install the trial versione of BDS2006 and recompile my
project and...suprise...it works well and RTS signal goes down
in 1 ms.!
I was convinced that Windows APIs were Windows APIs so they aren't
affected by other layers of development tools...but probably isn't true!

Is there someone can explain me this behaviour?
How can I work around this bug using C++Builder6?

Thanks in advance. Bye.

		Eugenio Monti
Technical Details
Message-ID: <441a6f41@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1bf375dcfb8a7ea5,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 17 Mar 2006 09:13:26 +0100
From: eugenio Monti <eugenio.monti@sisa-srl.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Serial port management with RTS_TOGGLE
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 213.140.16.187
Message-ID: <441a6f41@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1142583105 213.140.16.187 (17 Mar 2006 00:11:45 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail