[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Driving LED's with /dev/lp0



Hi Volks!

First i tried to build a simple circiut with directly drived some LED on
d0 to d4 on the par0-port.
I deactivated the lp0-support in the kernel and wrote direktly to par0.
It worked fine, but now i want to drive the LED's with the use of par0
cause
the circuit should be compatible with the parallel printer standard and
should also work on other computers.

So i changed the hardware: I used a 74hc573 to buffer the data coming
out from par0 when writing to lp0.
The LED's are connected to the output-pins from the 74hc573 (via
transistors).
The nSTROBE-Signal (from par0) goes through an inverter (74hc04) so i
get a STROBE signal, and this signal goes
into the 74hc573, so the 573-latch 'knows' when to take the incoming
data ( from par0) and transfers it to the output (LED's).

I tested the hardware with a simple copy-command from the shell 'cp
test.txt /dev/lp0'.
The copy-command failed with the error '/dev/lp0: Device or resource
busy'.

So i connected the BUSY-pin on par0 to ground.

After this, I tried again to copy a file to /dev/lp0 to test the
LED-hardware.

But now, after starting the cp-command ( cp .1_5M128i.img /dev/lp0 ) the
command hangs.
Why does the system (cp-command) hang? Do I have to generate a
ACK-Signal for the par0??
For what signal does the system wait?

(Kernel: lp0/1 activated, DMA not activated)
Do I need to activate the DMA??

Please help me, I am in a hurry.

Thx,
    Stefan.

(After my project, i try to share my sources/circuits with everybody,
cause i think there is a lot of documentation/example-work to be done at
axis.)

begin:vcard 
n:Weilhartner;Stefan
tel;cell:+43 664 3106170
tel;fax:+43 732 771111-111
tel;home:+43 664 3106170
tel;work:+43 664 3106170
x-mozilla-html:FALSE
url:www.eins.com
org:EINS - Einführung integrierter EDV-Systeme
version:2.1
email;internet:WhyLee@xxxxxxx.com
title:Systemadministrator
adr;quoted-printable:;;Gruberstrasse 2-4;Linz;Oberösterreich;4020;=D6sterreich
fn:Weilhartner Stefan
end:vcard