Re: Re: serial ports

mike@conexio.co.za
Wed, 7 Aug 1996 08:46:54 +0200


: even if you try to poll all the ports when you get an interrupt, this
: doesn't work very well above 12 ports or so. The problem is that in the
: time that it takes to scan all 12 ports, a character can come in the
: first port, which will get missed, so that when you return from the
: interrupt handler, the interrupt for the first port gets missed, and
: that first port will start dropping characters.

If you dont have the electrical problem (all ports on the same board designed
for sharing IRQs) then you can pull the following trick: When you enter the ISR
disable interrupts from the comm ports you want to service (on the comm port, *not*
the PIC). Then service all your ports. When you leave the ISR, re-enable ints
on the comm port , this should give you a new "edge" for the PIC and you dont miss
the interrupt. This assumes the PIC was software "acked" at the beginning when the c com port ints were disabled.