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

Re: Driving LED's with /dev/lp0



Hi!

The parallel port is set up in centronics mode which means that ETRAX
will wait for the ACK signal. You can connect the ACK signal to ground
to solve this. You don't have to enable DMA (and shouldn't if you are
using DMA on the serial ports).

The upcoming ETRAX 100LX designer's reference will explain how the
parallel port and all the other interfaces work and how to configure
them. 

Regards,
/Mikael

Stefan Weilhartner wrote:
> 
> 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.)