home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.msdos.programmer
- Path: sparky!uunet!usc!news.aero.org!speedy.aero.org!surtsey!don
- From: don@surtsey.aero.org (Don C. Hancock)
- Subject: Serial Driver Problems
- Message-ID: <1992Nov10.015241.21110@speedy.aero.org>
- Sender: news@speedy.aero.org
- Nntp-Posting-Host: surtsey.aero.org
- Organization: The Aerospace Corporation; El Segundo, CA
- Date: Tue, 10 Nov 1992 01:52:41 GMT
- Lines: 38
-
- Serial Driver Problem
-
- I hope this is the right place for this. If not, please
- let me know.
-
- I'm trying to program the serial port to control some equipment. I
- can't seem to get it (i.e. the port) to generate interrupts (such as
- the data received, or transmitter empty)
-
- What am I doing wrong?
-
- Here's what I've done so far (briefly, sort of).
-
- 1. Replaced vector 0x0c with my interrupt service routine. I'm
- pretty sure this right, because a geninterrupt(0x0c) gets to my
- routine.
-
- 2. Set up the serial port to interrupt on everything but the modem
- status change by writing 0x07 to the interrupt enable register.
-
- 3. Set 8259 interrupt controller to enable interrupts from IRQ3
- and IRQ4 with outp(0x21, inp(0x21) & 0xe7);
-
- 4. End my interrupt service routine with outp(0x20, 0x20).
-
- When I do a write followed by a read, I get the data I sent. I've done
- this using the loopback feature (set bit 4 of the modem control
- register) and by wiring pins 2 & 3 together, so the connections are
- right. I've also done the above for the second serial port, I just
- can't get the hardware to generate interrupts.
-
- Any ideas. I'll post (or email) code if it'll help me get an answer.
- Please email or post any replies (but email is preferred).
-
- Thanks for any help you can give me. I'm really troubled by this. I'm
- sure I'm doing something dumb here.
-
- Don
-