home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / msdos / programm / 2697 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.7 KB  |  50 lines

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!usc!news.aero.org!speedy.aero.org!surtsey!don
  3. From: don@surtsey.aero.org (Don C. Hancock)
  4. Subject: Serial Driver Problems
  5. Message-ID: <1992Nov10.015241.21110@speedy.aero.org>
  6. Sender: news@speedy.aero.org
  7. Nntp-Posting-Host: surtsey.aero.org
  8. Organization: The Aerospace Corporation; El Segundo, CA
  9. Date: Tue, 10 Nov 1992 01:52:41 GMT
  10. Lines: 38
  11.  
  12. Serial Driver Problem
  13.  
  14. I hope this is the right place for this.  If not, please
  15. let me know.
  16.  
  17. I'm trying to program the serial port to control some equipment.  I
  18. can't seem to get it (i.e. the port) to generate interrupts (such as
  19. the data received, or transmitter empty)
  20.  
  21. What am I doing wrong?
  22.  
  23. Here's what I've done so far (briefly, sort of).
  24.  
  25. 1.      Replaced vector 0x0c with my interrupt service routine. I'm
  26. pretty sure this right, because a  geninterrupt(0x0c) gets to my
  27. routine.
  28.  
  29. 2.      Set up the serial port to interrupt on everything but the modem
  30. status change by writing 0x07 to the interrupt enable register.
  31.  
  32. 3.      Set 8259 interrupt controller to enable interrupts from IRQ3
  33. and IRQ4 with outp(0x21, inp(0x21) & 0xe7);
  34.  
  35. 4.      End my interrupt service routine with outp(0x20, 0x20).
  36.  
  37. When I do a write followed by a read, I get the data I sent.  I've done
  38. this using the loopback feature (set bit 4 of the modem control
  39. register) and by wiring pins 2 & 3 together, so the connections are
  40. right.  I've also done the above for the second serial port, I just
  41. can't get the hardware to generate interrupts.
  42.  
  43. Any ideas.  I'll post (or email) code if it'll help me get an answer.
  44. Please email or post any replies (but email is preferred).
  45.  
  46. Thanks for any help you can give me.  I'm really troubled by this.  I'm
  47. sure I'm doing something dumb here.
  48.  
  49. Don
  50.