Second LPT port - SOLVED!

More
09 Apr 2020 19:18 #163382 by radek_marko
Second LPT port was created by radek_marko
Hi,
I'm trying to add second LPT port connected to PCI.
The port is detected by lspci -v
02:02.0 Parallel controller: Device 1c00:2170 (rev 0f) (prog-if 01 [BiDir])
    Subsystem: Device 1c00:2170
    Flags: medium devsel, IRQ 11
    I/O ports at bc00 [size=8]
    I/O ports at b800 [size=8]

If I'm selecting 1 port in conf then it all works, when I'm switching to 2 ports then the first port stops working :(

I've tried changing the base address of LPT1 in BIOS - it's the same for base address 0x378 and 0x278.

Any help would be appreciated.

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 19:22 #163383 by cmorley
Replied by cmorley on topic Second LPT port
are you using 0 and 1 for port addres values in linuxcnc?
If linux detects the ports properly then that should work

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 20:23 #163387 by radek_marko
Replied by radek_marko on topic Second LPT port
On the first port, I was trying leaving as 0 and second port I have 1.
I've also tried 0x378 / 0x278 on the first port and 1 on the second, but no luck.

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 20:55 #163390 by radek_marko
Replied by radek_marko on topic Second LPT port
How can I check "If linux detects the ports properly then that should work" - the tester I found for LPT port testing works only on LPT1 :(. Is there any option to test both ports?

I'm a newbie in the field - how can I check if the port is installed?
lspci -v shows that the card was detected - is that right?

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 21:56 #163397 by cmorley
Replied by cmorley on topic Second LPT port
so one is onboard and one is PCI?
The onboard can be made to work but the pci doesn't (and infact stops the onboard)

Do I have that right?
I'm no expert on parports but that will help those who are.

Please Log in or Create an account to join the conversation.

More
10 Apr 2020 00:21 #163416 by tommylight
Replied by tommylight on topic Second LPT port
In the hal file:
loadrt parport address "0x378, 0xbc00"

Please Log in or Create an account to join the conversation.

More
10 Apr 2020 06:59 #163453 by radek_marko
Replied by radek_marko on topic Second LPT port
so one is onboard and one is PCI? - correct

The onboard can be made to work but the pci doesn't (and infact stops the onboard) - correct. If in conf I will select a single port (with the second port still in PCI slot it works), when two parallel port selected the first stops working

Please Log in or Create an account to join the conversation.

More
10 Apr 2020 08:58 #163461 by radek_marko
Replied by radek_marko on topic Second LPT port
I did this test in the morning, but I think I might be doing things not 100% right

I'm attaching photos of my screen and changes in .hal (I'm not sure if in the correct one)

I have also found LPT tester, but it works only on LPT1, I've tried to add address as suggested, but it didn't work :(

Please Log in or Create an account to join the conversation.

More
10 Apr 2020 10:13 #163467 by radek_marko
Replied by radek_marko on topic Second LPT port
I've realized that my files were not uploaded due to the large size...

Please Log in or Create an account to join the conversation.

More
11 Apr 2020 15:44 - 11 Apr 2020 16:49 #163629 by radek_marko
Replied by radek_marko on topic Second LPT port
tommylight - Thank you very much for giving me the direction to follow. I've managed to test my LPT port, but I STILL CANNOT completelly fix the issue :(.

loadrt parport address "0x378, 0xbc00"

was the key for me

Just to remind my situation:
lspci -v

02:02.0 Parallel controller: Device 1c00:2170 (rev 0f) (prog-if 01 [BiDir])
    Subsystem: Device 1c00:2170
    Flags: medium devsel, IRQ 11
    I/O ports at bc00 [size=8] 
    I/O ports at b800 [size=8]

I've downloaded the LPT tester - from this thread LPT tester .

Then I have changed the address
loadrt parport cfg="0xbc00 out"
as Tommy suggested, but without any positive result then I have changed it to
loadrt parport cfg="0xb800 out"
and it worked as per video in this link: VIDEO

Then I moved to the config of LinuxCNC and I've put 0x278 as the address of the first parallel port and 0xb800 as the address of the second parallel port. The config is now able to move all step motors. To test 2nd LPT I've added the z-limit switch to be on this port and I'm getting an error when running LinuxCNC - see attached photo.

Any help would be massively appreciated as I know that the extension card works correctly.

I have also created a dual-port tester, might be useful for someone like me in the future (print screen below)
Attachments:
Last edit: 11 Apr 2020 16:49 by radek_marko.

Please Log in or Create an account to join the conversation.

Time to create page: 0.186 seconds
Powered by Kunena Forum