home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5816 comp.unix.xenix:47 comp.unix.aix:12965 comp.lang.c:19178
- Newsgroups: comp.unix.programmer,comp.unix.xenix,comp.unix.aix,comp.lang.c
- Path: sparky!uunet!wupost!spool.mu.edu!umn.edu!csus.edu!csusac!sactoh0!jak
- From: jak@sactoh0.sac.ca.us (Jay A. Konigsberg)
- Subject: Reading pins on a port
- Message-ID: <1993Jan4.092801.12117@sactoh0.sac.ca.us>
- Keywords: slave/local printer sets pin 20 high when buffer full and/or sets Xoff
- Organization: Sacramento Public Access Unix
- Date: Mon, 4 Jan 93 09:28:01 GMT
- Lines: 27
-
- I'm writing a program to control a printer attached to the AUX port
- of a terminal. Accuctally, its operational. However, I have to guess
- when the buffer is too full. If enough data isn't sent, then the printer
- is idle and if too much is sent the terminal locks up and can't be used.
-
- In testing I hooked a breakout box up to the AUX port and the printer
- and noticed that pin 20 (DTR) was going high when data ceased to be sent to
- the printer. Additionally, I suspect that the printer is sending Xon/Xoff
- but can't verify it.
-
- Additionally, I hooked the breakout box up between the terminal and the
- computer and saw that the DTR high is passed through to the computer.
-
- What I want to do is test the printer PRIOR to sending data through the
- terminal or, know that the printer sent an Xoff and wait for the Xon.
- If I can read the DTR from the serial port, that would be best. Though
- I want to support Xon/Xoff as a default.
-
- This is a home project and will be released in alt.sources or perhaps
- unix.sources when I'm done.
-
- Please respond by email as this has been posted to several newsgroups.
-
- --
- -------------------------------------------------------------
- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak
- If something is worth doing, it's worth doing correctly.
-