home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!csd4.csd.uwm.edu!markh
- From: markh@csd4.csd.uwm.edu (Mark William Hopkins)
- Subject: Re: How to do I/O on PC com port
- Message-ID: <1992Jul27.004437.20492@uwm.edu>
- Sender: news@uwm.edu (USENET News System)
- Organization: Computing Services Division, University of Wisconsin - Milwaukee
- References: <92196.150953REASON@MAINE.MAINE.EDU>
- Date: Mon, 27 Jul 1992 00:44:37 GMT
- Lines: 20
-
- In article <92196.150953REASON@MAINE.MAINE.EDU> <REASON@MAINE.MAINE.EDU> writes:
- >
- >Does someone know of an easy way to access a com port (e.g., COM1) for both
- >reading and writing in Turbo C (or C++)? We would like input and output to
- >be independent from each other (conceptually separate streams like stdin and
- >stdout are). We don't want to miss characters received while the program is
- >off doing something else. We think we have tried most of the obvious
- >approaches. Have we missed something? Is there an easy approach using
- >stdaux, fprintf, and fscanf or will we have to use bioscom and interrupts?
-
- In the ftp site csd4.csd.uwm.edu under /pub/8051/client.
-
- They are intended to be used with the 8051-related software located in the 8051
- directory (and to a small degree: to be used with certain RS-422/RS-485
- boards), but can easily be adapted to more general uses.
-
- (IBM com ports are RS-232).
-
- I've used the routines for 8051/PC links on RS-232, RS-422, RS-485 at rates up
- to 57600 baud and data sizes up to 9 bits without any timing errors.
-