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

Parallel port printing problem



Environment:
	Devboard 100LX
	Linux 2.4.14
	R2_1_0

Context:
	/dev/lp0

	Recompiled kernel with parallel support
	(left ser port 2 on as well despite potential DMA conflict)

Problem 1:
	It appears that the init line (active low)
	is always held low.

	I tested this by creating a cable with /init cut.
	Both my (entirely different) printers sprang to life.

	I wrote a small test program which effectively did:

		ioctl( "/dev/lp0", LPRESET, 0 )	# NOTE: PSEUDO CODE

	this calls lp_reset in  linux/drivers/char/lp.c
	which does (effectively):

		parport_etrax_write_control( LP_PSELECP);
		delay 50us
		parport_etrac_write_control( LP_PSELECP | LP_PINITP)

	and watched the oscillocope, the result was ~70us VCC pulse
	which then dropped back to GND.

	Now ...write_control( LP_PINITP)
	maps to SETF( R_PAR0_CTRL_DATA init )
	
	Which without digging further would appear to set the pin S0oe
	to high which does though an inverter to make it active low.

	Thus it appears that (assuming the linux lp.c code is correct)	
	then either the extrax_write code is wrong or the
	init_active = 1 etc in asm_cris/sv_addr.agh is wrong (others too?)
	or is ignored.


Problem 2:
	lots of parallel port "stuff" appears broken.
	(eg hwtest, DMA sharing, etc.
	and quoting from the release notes (2.1.0)
	"The read-back part of the parallel port driver does not work yet."

	I am concerned. Please could someone detail precisely what works,
	what is being fixed now, and what I have to fix.

	In particular I need reverse nibble mode for IEEE 1284 but I also
	need the basic stuff working too!

Board Layout Issue

	The 2 parallel port headers are too close together.
	Anyone wanting to use the connectors (me)
	will typically either want one or two parallel ports.
	Therefore it would have been far more logical to separate
	the two headers by at least one, preferably 2 pins (2 x 0.1")

	I have not come across any header plugs that have such narrow
	plastic bodies that you can plug a 26 way one onto the first
	26 pins without having to bend/cut off pins 1,2 of the neighbouring
	parallel port. There IS room on the board to have separated these.

	My alternative is to get a full length plug but there are no 52
	way IDC headers only 50 or 60. I suspect 60 is too long as well
	as being more costly.

	What should I do?

	regards
		kim

Kim Lester,
Senior Engineer,