Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Aug 2004 13:04:55 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        hackers@freebsd.org
Subject:   Controlling external hardware via lpt0
Message-ID:  <20040803125019.O1361@cactus.fi.uba.ar>

next in thread | raw e-mail | index | archive | help
First, I apologize if this isn't the right place for asking this things

I need to control some external hardware with a small program in
FreeBSD. I thought about using the 8 data bits of the parallel port
for sending the control bits  to the hardware.
The hardware is a very simple combinational logic, triggered by level,
I don't need any flow control or such.

The soft opens /dev/lpt0 and then writes whatever value is needed (i.e,
if I need the 2 lsb to be high and the rest low, I write 0x3)

The problem is, I can't even open the paralel port for writing, it
always fails with EBUSY.

on the parallel port I attached a DB-25 wired as a "dummy printer", that
is: strobe->/ack, busy, paper end and select inh, wired together and
then sent to pin 18 (GND).

Is there anything I'm missing? Are there a "programming and using the
parallel port in FreeBSD" guide?

Thanks in advance

				Fer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040803125019.O1361>