On Mon, 2011-04-18 at 07:54 +0200, Jan de Kruyf wrote:
... snip 
> I unfortunately do not know the parameters neededn for lp or EMC: In fact
> come to think of it, is lp used in EMC or ppdev???
... snip

Four drivers are normally loaded; lp, ppdev and parport_pc and parport.
In older versions of EMC2 one or two of these where required to be
unloaded and was handled by the Linux start-up scripts. For current
versions, I believe lp is needed if one wants to use a printer on the
EMC2 PC. I think ppdev (or parport_pc?) is needed if one wants to use
numbered ID's such as 0 for the first port, 1 for the second, etcetera.
If using only direct addresses for the loadrt hal_parport, none of the
other drivers are required to be loaded, or unloaded. Only the correct
address for the installed hardware is needed, otherwise an ID number
could be used.
http://www.linuxcnc.org/docview/html/hal_parallel_port.html 

To find the installed hardware addresses, "lspci -v" can be used to find
the addresses of PCI add-on ports. Usually the addresses shown are for
the base and the extended registers. The base addresses are used with
the hal_parport config string. An example can be found at the bottom of
the page here:
http://wiki.linuxcnc.org/emcinfo.pl?Startech

The listing shows the base and extended registers for the two parallel
ports on this particular PCI card. The "[ECP]" shows that ECP is
supported and also implies EPP is supported.

The motherboard parallel port addresses and other information may be
found by removing the parport_pc, then reloading and checking dmesg,
such as...
"
kwallace@910:~$ sudo rmmod parport_pc
kwallace@910:~$ sudo modprobe parport_pc
kwallace@910:~$ dmesg
...
[ 2525.974319] parport_pc 00:0a: disabled
[ 2544.613816] parport_pc 00:0a: activated
[ 2544.613826] parport_pc 00:0a: reported by Plug and Play ACPI
[ 2544.613967] parport0: PC-style at 0x378 (0x778), irq 7, dma 3
[PCSPP,TRISTATE,COMPAT,ECP,DMA]
[ 2544.701868] parport0: Printer, EPSON Stylus COLOR 600
...
"

On my workstation, it can be seen that I have a base register at 0x378,
an extended register at 0x778 and ECP (EPP), and an EPSON printer
connected.

Unloading, reloading and dmesg for the other drivers may provide more
information.

Other links:
http://wiki.linuxcnc.org/emcinfo.pl?SIIG 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?NetMos 

http://www.beyondlogic.org/ 

The port pins can not be relied upon to follow a standard, but it is
safer to assume that each output will source no current and sink up to
3mA. This means that a pull up resistor is needed to provide the output
current. The parallel port pin will pull the output to 0 Volts for a
logic 0, and allow the pull-up to bring the pin to 5 Volts for a logic
1. A 1.5k Ohm pull-up resistor to a 5 Volt supply is common. Depending
on the circuit that the output is connected to, a current limit resistor
and/or reverse current diode and/or opto-isolator may be needed. A
buffer chip such as a 74AC241 (244, 245 or similar) to drive any sort of
a load such as an LED. The AC series chips can source or sink 24mA.
http://focus.ti.com/lit/ds/symlink/sn74ac241.pdf 

If the parallel port runs on 3 Volts a level translator type chip may be
needed. PCI parallel port cards usually run on 5 Volts and are _much_
cheaper to replace than motherboard ports.

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to