IERBS02@TECHNION.BITNET (05/15/91)
I have a technical question for which nobody has given me the answer yet. How can I access the 25 pins of the parallel port? I would like to be able to take control of the port and then read the state of each pin (1 or 0) and change it. I use Aztec C 3.6. BEN STERN, Haifa Israel. bitnet IERBS02 @ TECHNION
johnhlee@CS.Cornell.EDU (John H. Lee) (05/15/91)
In article <91135.001746IERBS02@TECHNION.BITNET> IERBS02@TECHNION.BITNET writes: >I have a technical question for which nobody has given me the answer >yet. How can I access the 25 pins of the parallel port? >I would like to be able to take control of the port and then read the >state of each pin (1 or 0) and change it. I use Aztec C 3.6. You can't. Only 11 or so signal pins of the parallel port are programmable through one of the Amiga's CIA's (Complex Interface Adapters.) The remaining pins are either hardwired to a non-programmable CIA pin, ground, +5, or not connected. You can take control of the parallel port by requesting it through the operating system. Open the appropriate CIA resource and allocate only those CIA control bits and registers that control the parallel port (the CIA also controls other functions such as the serial port handshaking.) You can then program the parallel port as you desire. The CIA resource details are given in the version 1.3 (blue cover) Amiga ROM Kernal Manual: Libraries and Devices, and Amiga ROM Kernal Manual: Autodocs. Details about programming the CIA's are in the Amiga Hardware Reference Manual. ------------------------------------------------------------------------------- The DiskDoctor threatens the crew! Next time on AmigaDos: The Next Generation. John Lee Internet: johnhlee@cs.cornell.edu The above opinions are those of the user, and not of this machine.
forgeas@swinjm.UUCP (Jean-Michel Forgeas) (05/17/91)
In article <91135.001746IERBS02@TECHNION.BITNET>, IERBS02@TECHNION.BITNET writes: > I have a technical question for which nobody has given me the answer > yet. How can I access the 25 pins of the parallel port? > I would like to be able to take control of the port and then read the > state of each pin (1 or 0) and change it. I use Aztec C 3.6. Since you cannot have access to all 25 pins because a lot of them are the ground, if you really need more than the 11 pins available on the parallel port and if your application doesn't need to have an external drive connected, you can use the external drive connector nearly the same way you use the parallel one. You have an example how to access the parallel port directly (the legal way) using the Aztec compiler on the Fish disk #73: "ParOut". -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?