Article View: comp.os.msdos.programmer
Article #6958Re: PC Uarts & Interrupts
From: Steve Resnick
Date: Tue, 04 Jun 1991 22:42
Date: Tue, 04 Jun 1991 22:42
49 lines
2649 bytes
2649 bytes
In article <30559@hydra.gatech.EDU> jgb@prism.gatech.EDU (James G. Baker) writes:
>In article <1991May30.015340.27879@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes:
>>
>>I have a bunch of interrupt driven serial code I wrote, which inits the
>>port, sets up interrupts and handlers, then queus all incoming and outgoing
>>data ... So far so good, except that I get one interrupt. I am doing an EOI
>>by sending 20H to port 20H, and OUT2 is asserted to enable 8250 interrupts.
>>My interrupt enable value is 3, and my mask value to the 8250 is 0xEA.
>
>Getting only one interrupt sounds like the EOI is not being sent correctly.
Actually, I misstated above, the mask value to the 8259 is 0xEA.
^^^^
The problem turned out to be mis-reading the interrupt ID register on the
UART. Since the UART wasn't getting the correct interrupt reset, it would
only generate one (data available) and wait for it to be cleared.
>You say your interrupt enable value is 3 = ? = irq3? Keep in mind that
>on an AT, if you use irq2 it is actually irq9 (transparent) except that two
>EOI must be sent.
The interrupt enable value was for the UART, not the PIC.
Addtional information about IRQ 9, is that IRQ 9 generates an INT 0x71,
rather than an INT 0x11, since the slave 8259 uses a different offset value.
>
>If it is irq3, could there be anything else using irq3? Can you switch
>it to something else like irq5 (AT)?
>
irq5 (AT) ?? - 5 should be valid on any PC - it's the default IRQ used for
LPT2.
In anycase, I have the code working and may now read/write to my serial port
with ease :)
Cheers!
Steve
--
-------------------------------------------------------------------------------
resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0,
co moderator for comp.binaries.os2
Real life: Steve Resnick. Chief Software Architect, Process Scientific, Inc
Flames, grammar and spelling errors >/dev/null
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<1991Jun4.224201.21951@netcom.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!tandem!netcomsv!resnicksReferences:
<1991May30.015340.27879@netcom.COM> <30559@hydra.gatech.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!pacbell.com!tandem!netcomsv!resnicks
From: resnicks@netcom.COM (Steve Resnick)
Newsgroups: comp.os.msdos.programmer
Subject: Re: PC Uarts & Interrupts
Message-ID: <1991Jun4.224201.21951@netcom.COM>
Date: 4 Jun 91 22:42:01 GMT
References: <1991May30.015340.27879@netcom.COM> <30559@hydra.gatech.EDU>
Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest}
Lines: 49