pncconf - 5i25 - any way of making unused encoder inputs into GPIO's?

More
17 Oct 2018 21:50 #118961 by Dr. John
I'm using a 5i25 with the 5i25_prob_rfx2 "firmware". I'm also using a cheap "standard" breakout. This means that pins 10, 11, 12, 13 and 15 are inputs only while pins 14, 16 and 17 are outputs only. (This has nothing to do with the 5i25 per se. It's a limit of the breakout card.) I'd like to use pins 11, 12 and 13 for limit/home inputs. However, it seems that this is impossible to do with pncconf. Although it shows that there is an unused encoder, that seems to be mapped to pins 11, 12 and 13, it seems impossible to use these pins as GPIO pins, much less configure them to be used as limit inputs.

Any thoughts? Help is much appreciated.
More
18 Oct 2018 12:01 #118989 by andypugh
If you configure to have zero encoders then the encoder pins should be freed up for GPIO.

I am not sure how to do that in PnCConf, but the result you want in the HAL file would be something like
loadrt hm2_pci config=".... num_encoders=0 ...."

You can even change inputs to outputs and vice-versa on the 5i25, but the BoB is unlikely to be bidirectional.
More
18 Oct 2018 12:49 #118993 by PCW
Encoder inputs are available as GPIO inputs without doing anything special (like disabling the encoders), though pncconf may not give you the option to use these inputs

You need to disable the encoder(s) if you wish to use the corresponding GPIO pins as _outputs_
More
18 Oct 2018 13:35 #118995 by cmorley
In pncconf on the mesa page look at the configuration tab.
There is a line about number of encoders - change this line then press the 'accept component changes' button.
Now the encoder will be replaced with GPIO on the connector tabs.

Chris M
More
18 Oct 2018 17:45 #119006 by Dr. John
Thanks Chris! That's what I needed. Now on to the next hurdle!
Moderators: cmorley
Time to create page: 0.084 seconds
Powered by Kunena Forum