🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: WriteFile problems (help me!)

#16388
From: Martin Moeller
Date: Wed, 14 May 2003 17:02
32 lines
2394 bytes
"MWP" <mwp@overclockers.com.au> ha scritto nel messaggio
news:3ec26741$1@newsgroups.borland.com...
>
> The device at the other end is a LCD module which doesnt have any kind of
software/hardware flow control.
>

Confirm Ed's first guess: check rather the LCD and your software than the
pc. You do nothing special with the com port, so if that wouldn't work,
Windows would have to write off the serial interface as such.

What kind of LCD are you using? I have never heard about one with an asynch
serial interface. You probably have a third-party add-on controler board,
and these are all but reliable. And probably you are not just reading but
have to write a bytes to request reading. Are you sure you are syncronized
between writes & reads? The 250ms read cycles, is at a request by LCD specs
or is that just what you have seen as result?

Anyhow you should open the port in async mode, set its (internal) buffers
and both write & read having set the timeout structure.
Then every supposed write/read sesions should:
- clear Tx buffer and Rx buffer
- write request in one go (with timeout), not char by char as the LCD could
timeout.
- check tx-buffer empty flag,
- read n characters with timeouts.

Sorry I do not remember out of mind the exact structures and api calls for
that.

Rgds, Martin
Technical Details
Message-ID: <3ec2768d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ec25f43$1@newsgroups.borland.com> <3ec26129$1@newsgroups.borland.com> <3ec26741$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9ac30f5163521f9f
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-14 10:12:08 PST
Reply-To: "Martin Moeller" <martin.moeller@moema.it>
From: "Martin Moeller" <martin.moeller@moema.it>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ec25f43$1@newsgroups.borland.com> <3ec26129$1@newsgroups.borland.com> <3ec26741$1@newsgroups.borland.com>
Subject: Re: WriteFile problems (help me!)
Date: Wed, 14 May 2003 19:02:03 +0200
Lines: 34
Organization: Moe.Ma Italiana Srl
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.45.1.220
Message-ID: <3ec2768d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052931725 213.45.1.220 (14 May 2003 10:02:05 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail