Cannot use pins 2 - 9 as inputs, only outputs.

More
19 Apr 2011 20:41 #9122 by howardsmith
I have two parallel ports in my computer driving my SEIG KX1. The first port, 0x378, is setup to handle all the mill functions and works great.

I currently use the second port, a NetMos MCS9805CV based card at 0xdc00, to plug in my digitizing probe and drive coolant relays etc.

As I don't have a need to output anything with the second card, I want to use pins 2 - 9 as inputs from my pendant. My pendant needs a total of 7 inputs (2 for encoder A and B, 2 to select speed, 3 to select axis).

From what I've read, specifying 'in' in the hal file's port config line should allow me to use these pins as inputs.

loadrt hal_parport cfg="0x378 0xdc00 in"

However, when I fire up the hal meter and try to trip these pins, I get no action. Pins 10, 11, 12, 13, 15 all work perfectly.

Have I missed something? Is this card not capable of using 2-9 as inputs?

Thanks!

-Howard.

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

More
19 Apr 2011 20:58 #9124 by Mike_Eitel
Hi Howard

Lately I was hunting for a similar problem.
1. Did you modified according to :
If you encounter this problem, you must make sure that the Linux kernel module parport_pc is not loaded at boot time.
On Ubuntu systems, you can do this by creating a file in /etc/modprobe.d/ with the one line
install parport_pc /bin/true
The EMC2 packages put this line in the file /etc/modprobe.d/emc2.
2. Did you use lspci to look for the correct adress. ( I found that sometimes I needed a reboot with powerloss to get a result. )
3. And this was the hardest one I found that a interrupt conflict did ecactly what you describe..... Playing around with bios and PCI bus slot..... Opps, It worked ( AGAIN )

Mike

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

More
20 Apr 2011 13:15 #9164 by howardsmith
I have the modprobe.d file with that line in it, so that much must be 'ok'.

lspci is how I found the address in the first place - 0xdc00
lspci shows many addresses for this card, but the first, 0xdc00, is the only one that will let EMC use the card.

I'll try messing around with the bios/interrupts and see if I can get some action that way.

Thanks for the help, I'll let you know how I make out.

-Howard.

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

More
20 Apr 2011 15:21 #9168 by cncbasher
pins 2 - 9 are output only on a parallel port ,
pins 10,11,12,13,15 are input only
pins 1 , 14,16,17 are bi directional
pin 18 - 25 are ground

only other way is using an pci i/o card or mesa card etc modbus perhaps ?

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

More
20 Apr 2011 15:56 #9169 by Mike_Eitel
Hi cncbasher
Sorry but pin 2-9 can be changed by driver if you can use ECP/EPP mode for that card.

Howard
If you want you can download www.eitel.ch/mechatronics/MeCNC/cnc.zip
In the configs directory, there is a subdirectory porttest. There you find a .hal/xml combination to test a two parport configuration,
with first normal and second one in IN modus. Second port adress is xD400 ...
The file is called LPTplusIN.hal..
Use terminal in that directory and: halrun -I -fLPTplusIN.hal

Hope this helps you a bit

Mike

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

More
20 Apr 2011 17:36 #9172 by howardsmith
Good tool, thanks.

Using that, I could get the 0x378 card to use pins 2 - 9 as inputs if I short them with pin 13. So, I lose pin 13 as an input, but I gain 2 - 9, so it's all good. I'm sure that's not the right way of doing this, but it's working so I'm not going to mess with it. The add-on card would become 'TRUE' on these pins when shorted with 13, but they would never return to 'FALSE', so, no good.

What I'm noticing now, however, is that it takes a few seconds for pins 2 - 9 to change from true to false after I open the circuit. Is this normal? I'm using 3 of these pins as 'axis selection' on my pendant and if I don't wait a couple of seconds after changing the switch, I can actually be moving two axes at the same time! Dangerous.

-Howard.

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

More
20 Apr 2011 17:46 #9173 by Mike_Eitel
You should take via extra cable the 5 Volts NOT 12 Volt from PC power supply.

And use resistors, ca 5K between ground and signal.

My inputs react fast, your delay might be eplainable as you have nit realy clear signals....
An output of the printercard will not give a nuce source of supply.

I soldered a wire from the card to an additional connector, with i fixed on the card.

Mike

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

More
20 Apr 2011 17:53 #9174 by howardsmith
Good info, thanks. I'll look at getting it some cleaner power. I'm just happy now that I've got SOMETHING to work on. The frustration was overwhelming. lol.

Thanks again.

-Howard.

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

More
01 Dec 2018 23:45 #121693 by Emanresu
Hello Folks,

after hours of searching for exactly the same problem i stranded here...
My parallelport just ignores IN/OUT from Hal and any BIOS setting.
In Bios I have: ECP, EPP, Dual, OUT-Only.

Doesnt matter, what kombination i try; the port is allways in "OUT" mode.

Is it possible, that a port cannot be switched and the Bios stuff is a placebo= O.o


Greetings Emanresu

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

More
02 Dec 2018 01:49 #121696 by rodw
I've never actually used a BOB but I understand some of them have fixed pins for Inputs and Outputs that can't be changed..

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

Moderators: PCWjmelson
Time to create page: 0.194 seconds
Powered by Kunena Forum