parport does not work in diection "in"
- grandixximo
- Topic Author
- Offline
- Premium Member
- Posts: 132
- Thank you received: 5
parport0:
modes:PCSPP,TRISTATE,COMPAT,ECP
ADDR :0x378
IRQ :7
DMA :no DMA used
parport1:
modes:PCSPP,TRISTATE,COMPAT,ECP
ADDR :0x1030
IRQ :21
DMA :no DMA used
parport2:
modes:PCSPP,TRISTATE,COMPAT,ECP
ADDR :0x1020
IRQ :21
DMA :no DMA used
With parport0 (0x378) i control the machine, with parport2 (0x1020) i read signals from the pendant, but i can only use parport2 for my pendant because parport 1 (0x1030) even if set as "in" on the hal_parport cfg line it will not work as in, i can read input 10 but i don't see input from pin 2 to pin 9, same goes if i try to connect the pendant to the parport0 (0x378) it will not work properly even tough i set "0x378 in" on the hal_parport cfg line
But i can use parport2 (0x1020) as in or as out without problems, i don't understand why the other two ports work only as out, i need to ass supplementary inputs to control an automatic tool change but i'm stuck at making the port read my inputs, any help?
Please Log in or Create an account to join the conversation.
PCI parport cards can be a vexed question, you will need to provide more info.
Sounds like you have a single dual port card, one hard wired port and one on a flyer from a header on the card?
We will need to know make, model, what chipset etc and output from 'lspci -vv' before anyone can venture an answer.
regards
Please Log in or Create an account to join the conversation.
- grandixximo
- Topic Author
- Offline
- Premium Member
- Posts: 132
- Thank you received: 5
The only one that works both ways "in" and "out" it's the one on the flyer...
Please Log in or Create an account to join the conversation.
even the parport built in the motherboard (0x378) does not seems to work in "in" direction...
Hi
Whilst the print you generated shows the available modes, it does not say what mode the internal parport is in, that will be controlled by BIOS setting
See below, setting to SPP mode seems most likely to be successful, but there are other considerations such as whether your pendant is buffered / isolated, before you consider attaching it directly to the built-in port.
Its much easier to replace a card than a motherboard.
www.linuxcnc.org/docview/html//hal_drivers.html
regards
Please Log in or Create an account to join the conversation.
I would also be very sceptical about both the card port addresses from your print being correct, they are only 0x10 apart.
lspci -vv from my machine with a dual port card shows something much more familiar
0x5c00 is the hardwired parport and 0x5800 is the fly lead, which is currently unused
03:05.2 Parallel controller: NetMos Technology Unknown device 9865 (prog-if 03 [IEEE1284])
Subsystem: Unknown device a000:2000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64, Cache Line Size: 32 bytes
Interrupt: pin C routed to IRQ 11
Region 0: I/O ports at 5c00
Region 1: I/O ports at 5800
Region 2: Memory at e0205000 (32-bit, non-prefetchable) [size=4K]
Region 4: Memory at e0204000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [48] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot-,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Please Log in or Create an account to join the conversation.
- grandixximo
- Topic Author
- Offline
- Premium Member
- Posts: 132
- Thank you received: 5
Communication controller: NetMos Technology PCI 9815 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic Device 0020
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR+ INTx-
Interrupt: pin A routed to IRQ 21
Region 0: I/O ports at 1030
Region 1: I/O ports at 1028
Region 2: I/O ports at 1020
Region 3: I/O ports at 1018
Region 4: I/O ports at 1010
Region 5: I/O ports at 1000
Kernel driver in use: parport_pc
Kernel modules: parport_pc
i went in the bios and put the parport setting to SPP but nothing changed, i'm going to try and set it as bi-directional to see if it fixes the problem
Please Log in or Create an account to join the conversation.
Do the ports work in output mode? You should check which of these addressesthis is what lspci -vv give me
Region 0: I/O ports at 1030
Region 1: I/O ports at 1028
Region 2: I/O ports at 1020
Region 3: I/O ports at 1018
Region 4: I/O ports at 1010
is connected to which port. Usually, the mode control register will be ABOVE
the port address. So, if the base address of one of the ports is 1030, there
is nothing above it for the mode control. I might take a guess that the
base registers for the two ports might be 1010 and 1020, or 1018 and 1028.
That would leave a register group above each of the port registers for the
mode control registers. (There are generally 3 mode control registers in
a group for each port.)
Jon
Please Log in or Create an account to join the conversation.
Kernel driver in use: parport_pc
Kernel modules: parport_pc
Just noticed this in your lspci output.
See the previous link re parports, driver is normally blocked from being loaded automatically.
I'll leave Jon to follow that if relevant, he has forgotten more than I know about these ports.
regards
Please Log in or Create an account to join the conversation.
- grandixximo
- Topic Author
- Offline
- Premium Member
- Posts: 132
- Thank you received: 5
i'll try to see if i can prevent the parport driver to load.
if i try to use numbers 1018 and 1028 i get error
insmod: error inserting '/..../hal_parport.ko':
-1 Device or resource busy
Please Log in or Create an account to join the conversation.
- grandixximo
- Topic Author
- Offline
- Premium Member
- Posts: 132
- Thank you received: 5
Kernel driver in use: parport_pc
is not there anymore, all the rest is same as it was BUT
Still nothing has changed i can use address 1020 as in or out, but address 1030 and 378 only as out.
I don't get any error with all the address now, and i have try loading all from 1000 to 1030 including 1018 and 1028, none of them work when my pendant is connected to the PCI hardwired parport (wich work as out on 0x1030)
Same goes for the 0x378 parport, it does not work as in, even after changing BIOS settings to SPP.
@jmelson
The ports both work as "out" on address 1020 for the flyer and 1030 for the hardwired.
It maybe that the hardwired port does not have mode control register, or maybe they are NOT ABOVE the port address?
Please Log in or Create an account to join the conversation.