Mail Archives: djgpp/2005/10/14/07:31:29

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: reading from com1: => driving me nuts
Date: 14 Oct 2005 11:26:26 GMT
Lines: 33
Message-ID: <>
References: <1h4c4cp.1b942cr1g5grtnN%muellernick AT gmx DOT de>
X-Trace: bUutifceZgmGF70KLSzwsg1UtHz9U3+8fnzEXF1We3l7cUujspfWpL9PcE
X-Orig-Path: not-for-mail
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Nick Müller <muellernick AT gmx DOT de> wrote:

> I want a serial communication with a uC. The Baud-rate is 115200, 

From a DJGPP program running inside Windows?  Sorry, but I suspect
that's doomed to fail.  You're pretty much guaranteed to lose some
characters every once in a while, at such high baud rates.  Even with
a hardware FIFO, 115200 can very easily become too fast to be
manageable, with all those context switches and the rest of Windows
eating into your program's CPU time.

> set propper params with MODE com1:blablabla

That's a very crude way of doing this.  Consider using a proper serial
port communication library.  There's about a handful available for
DJGPP on the ftp servers.

> I can send characters to the uC that are propperly understood and the uC
> is sending the answer. **BUT** I always get 16382 CHR0 on the DOS-side.

You get _what_?  What's '16382 CHRO' supposed to be?

> Oh, if it makes a difference, I (currently) let my program run in a
> DOS-box under Win XP pro.

That's about as hostile an environment as you could come up with.  You
may have to consider switching to native Win32 programming (using
Cygwin or MinGW32 instead of DJGPP), and completely change how you
access the serial port, in the process.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -

  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019