home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!inmet!bu.edu!att!linac!uwm.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!swrinde!elroy.jpl.nasa.gov!news.aero.org!speedy.aero.org!surtsey!don
- From: don@surtsey.aero.org (Don C. Hancock)
- Newsgroups: comp.os.msdos.programmer
- Subject: Serial Driver Problem
- Message-ID: <1992Nov10.015504.21169@speedy.aero.org>
- Date: 10 Nov 92 01:55:04 GMT
- Sender: news@speedy.aero.org
- Organization: The Aerospace Corporation; El Segundo, CA
- Lines: 38
- Nntp-Posting-Host: surtsey.aero.org
-
- 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
-