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

RE: LPT-port



Hi!

You must enable parallell port 1 in Etrax. In the file
elinux/arch/etrax100/kernel/head.S you can find the 
following rows:

#if defined(CONFIG_ETRAX100_PARALLEL_PORT0) || defined(CONFIG_ETRAX_ETHERNET_LPS
LAVE) || defined(CONFIG_LCD_HD44780) || defined(CONFIG_ETRAX100_PARDATA)
        or.w    0x4,r0  ; parport 0 enabled using DMA 2/3
#endif
#if defined(CONFIG_ETRAX100_PARALLEL_PORT1) || defined(CONFIG_ETRAX_ETHERNET_LPS
LAVE)
        or.w    0x80,r0 ; parport 1 enabled using DMA 4/5
#endif

You can e.g. change the later to:

#if defined(CONFIG_ETRAX100_PARALLEL_PORT1) || defined(CONFIG_ETRAX_ETHERNET_LPS
LAVE) || defined(CONFIG_ETRAX100_PARDATA)
        or.w    0x80,r0 ; parport 1 enabled using DMA 4/5
#endif

If you want to use both parallell ports you can use the minor number
of the device to select which parallell port to use (requires modifications
to the pardata driver).

You should also be aware of the differences in the connection between
parallell port 0 and 1. Parallell port 0 has a buffer and some inverters
(refer to the schematics). I recommend to add an external buffer to 
parallel port 1 to avoid destructive signals to Etrax.

Regards
/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Henrik Löfgren
Sent: Friday, January 12, 2001 9:01 AM
To: dev-etrax
Subject: LPT-port


Hello,

I have problem reading data from the LPT-port.

I'm using LPT0 as input via your "etrax100pardata"-driver and that works
fine.

My problem is to use LPT1 as input.


I configure the port with:	*R_PAR1_CONFIG = 0x00000060

When I then reads from "*R_PAR1_STATUS_DATA" it always returns zero.



How do i read from LPT1?



// Henrik Löfgren
   Transmode system AB