home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11923 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.6 KB  |  66 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!mkohtala
  3. From: mkohtala@lesti.hut.fi (Marko Kohtala)
  4. Subject: Re: Serial Communication Question
  5. Message-ID: <mkohtala.726517845@vipunen.hut.fi>
  6. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  7. Nntp-Posting-Host: lesti.hut.fi
  8. Reply-To: Marko.Kohtala@hut.fi
  9. Organization: Helsinki University of Technology, Finland
  10. References: <1993Jan7.144009.10363@panther.mot.com>
  11. Date:  8 Jan 93 18:30:45 GMT
  12. Lines: 52
  13.  
  14. In <1993Jan7.144009.10363@panther.mot.com> asu@server2.panther.mot.com (Russell Trotter) writes:
  15.  
  16. >Hello,
  17. >  A few days ago, my boss posted a question needing some info
  18. >on setting up/initializing the com port and read/write howto's.
  19. >After digging through the code we got from replies, we found that the best way 
  20. >to do this was to use some code that would actually access
  21. >the UART?
  22.  
  23. Yes. If you do not want to access the UART directly, you can get a
  24. FOSSIL device driver that does it for you and use the FOSSIL. Most BBS
  25. programs use this approach.
  26.  
  27. Two popular FOSSIL device drivers are X00 and BNU. They come with all
  28. the necessary API documentation.
  29.  
  30. >My question is, what, precisely, are these
  31. >status interrupts for, and are they absoultely necessary?
  32.  
  33. Receiver Line Status
  34.     Source: Overrun, Parity or Framing error or Break
  35.     Reset: Read the LS register
  36.  
  37. Modem Status
  38.     Source: Clear to Send or Data Set Ready or Ring Indicator or Data
  39.         Carrier Detect. 
  40.     Reset: Read the MS register
  41.  
  42. They are not absolutely necessary. Modem Status can be used to
  43. implement hardware flow control: change in Clear to Send causes an
  44. interrupt and if it is set, the interrupt routine should start to
  45. transmit if there is data in the transmit buffer.
  46.  
  47. Also, for these to work, you must make sure that the interrupt
  48. conditions are reset. The thing to do to reset is shown above. If you
  49. do not reset the interrupt, it will stay on and there will not be
  50. another interrupt on AT bus. In MCA I think it will cause the
  51. interrupt handler to be called constantly untill the interrupt is
  52. reset thus hanging the machine.
  53.  
  54. Received Data interrupt can be reset by reading the Receive Buffer
  55. register. Transmitter Holding Register Empty interrupt can be cleared
  56. by reading IIR or writing to THR.
  57.  
  58. If you have any problems, I am willing to write you a tailored comm's
  59. module for a reasonable compensation. I have written the one used in
  60. Telemate communications program. 
  61. -- 
  62. ---
  63. Marko Kohtala - INTERNET:Marko.Kohtala@hut.fi, mkohtala@otax.tky.hut.fi
  64. Student at (not representative of) the Helsinki University of Technology
  65.