How to configure second parallel port pins as input only

More
05 Oct 2019 01:40 - 05 Oct 2019 01:44 #147151 by nour
Hi,
I have in my PC a built-in parport and I have added another parport card and it is working fine, I have already confirmed this.
My question is how to use second parallel port pins as inputs (if possible all of them).

When using Stepconf wizard, I can't set all the pins to input for example I want to use first 6 pins (from 1 to 6) as limit switches input but pin number 1 always appears as output!!
How do I change this?

I just started to use Linuxcnc and I am still trying to understand how everything works.

thanks
Last edit: 05 Oct 2019 01:44 by nour.

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

More
05 Oct 2019 01:46 #147152 by andypugh
Only some of the parallel port pins are bidirectional, three are hardware configured as outputs:
linuxcnc.org/docs/2.7/html/hal/parallel-port.html

See the "loading" section for how to configure as input.

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

More
05 Oct 2019 08:09 #147161 by tommylight
IIRC:
mode out is 8+4 out / 5 in
mode in is 8+5in / 4 out
mode x is 8 out / 9 in

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

More
05 Oct 2019 09:26 #147169 by nour
Is there any way to add a new mode to those 3 modes?
I have read the section mentioned in the last reply but I can't fully understand why I can't change the pins functions for each individual pin?

According to Table 1. Parallel Port Direction, the pin can be either input or output in the In mode or the X mode and that goes for pin 1, 16 and 17. If that so, why it is not possible to make a new compilation that has all the pins act as input if the same pin can have both functions in different modes?

I am sure I am missing something obvious, I am sorry I just started using LinuxCnc a few days ago and I barely understand how to operate it!

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

More
05 Oct 2019 09:33 #147172 by nour
According to this page table 1.1: Pin directions and associated registers all pins can act as inputs and thats what I want to do on the other parallel port that I have, I want this port to be only input and I will use the first port for output only.

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

More
05 Oct 2019 09:42 #147177 by pl7i92
only this 3 modes are safe to use on the parport
and IBM 15 rule is conform to use only this pins for there main direction

therefore you can add 4 parports to a machine
so this shout be well overkill

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

More
05 Oct 2019 18:42 #147213 by andypugh

According to this page table 1.1: Pin directions and associated registers all pins can act as inputs.


I have never seen any other reference make that statement. Can you find one?

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

More
05 Oct 2019 18:54 #147215 by tommylight

According to this page table 1.1: Pin directions and associated registers all pins can act as inputs.


I have never seen any other reference make that statement. Can you find one?

Me neither. Was wondering where he got the idea !

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

More
05 Oct 2019 19:17 #147217 by pl7i92
in 1985 HP got a projekt as the IO for there Carosell pencil printer got to have the spare inputs to decine a parport over the centronics
but that never made it to public market
in newer days we woudt wish it had full control of all pins bidirectional
the IBM Ms standard wars set as so many production parts did fit the neeed
The following user(s) said Thank You: nour

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

More
05 Oct 2019 20:34 #147220 by cmorley

Is there any way to add a new mode to those 3 modes?

If other modes are possible on your hardware, the parport component would need to be reprogrammed to support them.

I have read the section mentioned in the last reply but I can't fully understand why I can't change the pins functions for each individual pin?


My guess is the original programmer choose to use the most common modes available in hardware, particularly in older PCs.
Linuxcnc code is quite old and targeted older PC hardware at the time.

Bottom line is - you can't have stepconf/linuxcnc set all pins as input.

Chris
The following user(s) said Thank You: nour

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

Time to create page: 0.225 seconds
Powered by Kunena Forum