🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5693

Re: defeating time-out on com ports?

#5693
From: Gunnar Dahlstrom
Date: Wed, 10 Apr 1991 06:40
38 lines
2202 bytes
In article <3603@naucse.cse.nau.edu> rrw@naucse.cse.nau.edu (Robert Wier) writes:
> Now, working on the same project I've run into a snag using the 
> COM port.  We have a situation where we don't know when the 
> data will appear - it can be anywhere from 100 ms to 11 seconds
> after the previous carriage return.
>
> The problem we are having (my students are currently using 
> Quick-C) is that when you go out to read a character and there
> isn't one there yet, the port seems to "time out" in 1.5 seconds
> or so.  I can't find any way to defeat this, although I certainly
> see why in most circumstances it would be useful.
>
> I know it CAN be done, because Kermit does it.  The big K just
> sits waiting patiently for something to arrive and display it on
> the screen.
>
> Does anyone know how to do this?  Does it require going directly
> to the UART and bypassing the built in routines?  Or is there 
> something actualy in the hardware in the nature of a switch
> which has to be reset?
>

You can do this by first checking if there is a character to fetch and after
that fetch the character!

And how to check if there is somthing to fetch is simple, just check the com
ports status register!

// Gunnar


===============================================================================
				Gunnar Dahlstrom
			Chalmers University of Technology
			    Div. Building Technology
			   412 96 Gothenburg,  Sweden
			E-Mail:  dahlstr@hus.chalmers.se
===============================================================================
Technical Details
Message-ID: <1991Apr10.064002.3867@afs-news.utc.chalmers.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!chalmers.se!afs-news!trout!dahlstr
References: <3603@naucse.cse.nau.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!chalmers.se!afs-news!trout!dahlstr
From: dahlstr@hus.chalmers.se (Gunnar Dahlstrom)
Newsgroups: comp.os.msdos.programmer
Subject: Re: defeating time-out on com ports?
Message-ID: <1991Apr10.064002.3867@afs-news.utc.chalmers.se>
Date: 10 Apr 91 06:40:02 GMT
References: <3603@naucse.cse.nau.edu>
Sender: news@afs-news.utc.chalmers.se (News System)
Reply-To: dahlstr@hus.chalmers.se ()
Organization: Chalmers University of Technology, Gothenburg, Sweden.
Lines: 38