Message-ID: <3E251E0C.3144A6A8@invalid.com> From: Ismo Salonen X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Libnet serial port problem References: <3e23e78b$1 AT news DOT infonet DOT ee> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 38 Date: Wed, 15 Jan 2003 08:37:39 GMT NNTP-Posting-Host: 192.89.97.1 X-Complaints-To: abuse AT inet DOT fi X-Trace: read3.inet.fi 1042619859 192.89.97.1 (Wed, 15 Jan 2003 10:37:39 EET) NNTP-Posting-Date: Wed, 15 Jan 2003 10:37:39 EET Organization: Sonera corp Internet services To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Vinzent Hoefler wrote: > > Tonu Aas wrote: > > >> I'm having some trouble with some serial port code I'm writing with > >> Libnet under djgpp. Everything's fine if I only use one serial port, > >> but if I try to receive from both serial ports at once, information > >> can only get through from one of them at a time. Each serial port > >> works fine by itself. > > > > If they use the same IRQ(COM1, COM3 or COM2 COM4) then its normal. > > No. Just bad software. There are enough status bits on the UART chip to > see which one has raised the interrupt. It just slows down a little > bite, because you have to ask all possible UART that are sharing the > same IRQ. > > Vinzent. > > -- > According to Kentucky state law, every person must take a bath at least > once a year. Actually the problem is hardware related. On older computers the IRQ line is high level active. Each uart drives the irq line it is connected to via tristate buffer. The buffer is enabled with a bit in the uart. If two uarts drive the same line then results are unpredictable. If one drives it up and other it down it might even break the buffers. So usually you can connect only one (active) uart to an irq line. Software could be setup to ignore the interrupts and poll the uarts if needed. Of course COM(1 or 3) and COM(2 or 4) should work same time because they use different irqs. ismo