home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10838 < prev    next >
Encoding:
Text File  |  1992-11-21  |  1.8 KB  |  39 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!van-bc!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!gay
  3. From: gay@beaufort.sfu.ca (Ian D. Gay)
  4. Subject: Re: BC++ & Serial IO - is there an easy way?
  5. Message-ID: <gay.722408687@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. References: <mjr.722383467@ursa> <s1110238.722393168@giaeb>
  9. Date: Sun, 22 Nov 1992 05:04:47 GMT
  10. Lines: 27
  11.  
  12. s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth) writes:
  13.  
  14. >mjr@ursa.calvin.edu (Matt Ranney) writes:
  15.  
  16. >>I'm using BC++ 3.1, and I'm trying to write a program that does some
  17. >>simple serial IO at 9600 baud on COM1.  I typed in the bioscom example
  18. >>from the book, but that doesn't work.  Every time it goes to send a
  19. >>character, the machine hangs for like 2 seconds, and it never thinks
  20. >>there is any data waiting to be read.  It does this on every machine
  21. >>I've tried it on, although they are all the same kind of machine:
  22. >>386sx's.  Has anybody else had this problem?
  23.  
  24. >I do not use BC++, however the source of your problem may be the fact
  25. >that you are trying to use 9600 baud, for polled serial communications.
  26.  
  27. >Using this method the data speed should be limited to 1200 bps.  For
  28. >speed greater than this you need to install an interrupt handler to
  29. >handle interrupts generated by your serial port.
  30.  
  31. This is not correct, the bios routines work ok at 9600 even on a 5MHz 
  32. XT, if you're not trying to do something else at the same time. (In 
  33. which case you do need interrupt-driven I/O).
  34.  
  35. The source of the problem is most likely that whatever your comm port 
  36. is connected to is not asserting DSR and CTS. The bios routine will 
  37. not transmit until these signals are both high, and just times out in 
  38. a second or two, without transmitting anything, if they never go high.
  39.