Problems using plugin PCI parallel port as main IO.

More
9 years 11 months ago #82430 by Mouse
Hi,
I've had linuxCNC running on a flatbed router for several months however after a PC failure the computer was changed and I can not get Linux CNC to communicate with the plug in PCI parallel port. dmesg and lspci suggest the plug in card is being recognised in at some level in both hardware and operating system however I can't get LinuxCNC to work with it.

Details:
Motherboard has no on-board parallel port.
Plug in PCI parallel card has 9865 chipset in it.

I have tried manually changing the .hal file to the address listed below from lspci with no success.

Any pointers to what I may be doing wrong?

Response from dmesg,
Code:
awesomearms@debian:~$ dmesg | grep parallel [ 10.720118] PCI parallel port detected: 14f2:0121, I/O at 0x1008(0x0), IRQ 23 [ 18.703161] ppdev: user-space parallel port driver

Response from lspci --vv
Code:
06:00.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03 [IEEE1284]) Subsystem: Device a000:2000 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B+ DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 32, Cache Line Size: 64 bytes Interrupt: pin C routed to IRQ 23 Region 0: I/O ports at 1008 [size=8] Region 1: I/O ports at 1000 [size=8] Region 2: Memory at 90001000 (32-bit, non-prefetchable) [size=4K] Region 4: Memory at 90000000 (32-bit, non-prefetchable) [size=4K] Capabilities: <access denied> Kernel driver in use: parport_pc

Please Log in to join the conversation.

More
9 years 11 months ago #82433 by jmelson
Is this for software-generated steps? If so, any parport card should work fine. You will have to go into the HAL file and change the port address to either 1000 or 1008, which lspci shows as the ranges of I/O prt addresses.

Ahh, one other thing. Newer parallel ports run on 3.3 V, the old (really old) ports ran on 5V. This could cause some step drivers to not see enough voltage/current to operate. If that is the case, a break out board with voltage boosters will be needed.

Jon

Please Log in to join the conversation.

More
9 years 11 months ago #82434 by Mouse

jmelson wrote: Is this for software-generated steps?

Yes. Step, Direction and limit stops etc...

jmelson wrote: You will have to go into the HAL file and change the port address to either 1000 or 1008, which lspci shows as the ranges of I/O prt addresses.

I have tried both 1000 and 1008 as well as converting them to hex 0x3E8 and 0x3F0 and tried those as well but no luck.

I put the address in this line of the .hal file.
Code:
loadrt hal_parport cfg="XXXX"

Please Log in to join the conversation.

More
9 years 11 months ago #82435 by Todd Zuercher
What does this show you?
Code:
cat /proc/ioports | grep parport

Please Log in to join the conversation.

More
9 years 11 months ago #82437 by Mouse
Thanks, I get.
Code:
awesomearms@debian:~$ cat /proc/ioports | grep parport 1008-100a : parport0 100b-100f : parport0

Please Log in to join the conversation.

More
9 years 11 months ago #82438 by Todd Zuercher
It looks like you have a 2 port parallel card and addresses should be 0x1008 and 0x100b. You will have to figure out which is which.

Did you say you already tried loadrt hal_parport cfg="0x1008"?

Please Log in to join the conversation.

More
9 years 11 months ago #82439 by Mouse
0x1008 was unresponsive and 0x100b gave the following error on the Linux CNC error window.
Code:
Debug file information: . Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Device or resource busy ./beastatronVFD.hal:6: exit value: 1 ./beastatronVFD.hal:6: insmod for hal_parport failed, returned -1 See the output of 'dmesg' for more information. 8861 PID TTY STAT TIME COMMAND Stopping realtime threads Unloading hal components

I have also noticed that dmesg has the parallel port at 0x1008 but also on IRQ 23, does this need to also be set?
Code:
[ 10.720118] PCI parallel port detected: 14f2:0121, I/O at 0x1008(0x0), IRQ 23 [ 10.720140] parport0: PC-style at 0x1008, irq 23 [PCSPP,TRISTATE,EPP]

Please Log in to join the conversation.

More
9 years 11 months ago #82440 by Todd Zuercher
Reboot and try 0x100b again.

Please Log in to join the conversation.

More
9 years 11 months ago #82442 by Mouse
Same error as I described above. :(

I'm off for the weekend but will try out any further suggestions on Monday.

Please Log in to join the conversation.

More
9 years 11 months ago #82444 by Todd Zuercher
Just noticed that both the addresses from your above cat /proc/ioports | grep parport are listed as parport 0. When I use that command on a machine with multiple parallel ports I get this.
Code:
0378-037a : parport0 e030-e032 : parport2 e050-e052 : parport1

Something goofy is going on. Before when you said 0x1008 was "unresponsive" what did you mean? Unresponsive to what?

Please Log in to join the conversation.

Time to create page: 0.261 seconds
Powered by Kunena Forum