Mapping of pins on 7c81 P1, P2, and P7 to GPIO numbers

More
19 Nov 2021 22:43 #227031 by foxkid
I've been reading a lot of information here, and have gradually pieced some things together.

I am using LinuxCNC/AXIS version 2.8.2-59-g2e94d346a on a Raspberry Pi 4 with a Mesa 7c81 programmed with 7c81_5abobx2d.bin

I can with some finageling get pulses into the stepper controllers.

Reading the posts on the 7c81, the advise seems to be to start with pncconf for the 5i25, and then edit the .ini and .hal files for the correct board type and interface driver.  I've done that.

The further advise is to edit the .hal file for the GPIO pins need for almost everything other than step generation.  In my case, that is jog lines per axis (or maybe an encoder), home/limit switches, E-stop, probe, coolant, vacuum, and maybe a couple of others.

I have two problems.  The first is how to map the linuxcnc virtual GPIO pin numbers to 7c81 GPIO numbers and then to 7c81 connector/pin numbers.  The second is that I have to re-edit everything if I need to change stepper configurations, machine bed size, or other things that are configured through the pncconf program.

I looked a bit at the pncconf.py code, and it looks a bit daunting to modify it without more knowledge.

What is the definitive way to know the 7c81 to linuxcnc virtual GPIO pin numbers to physical 7c81 pins?

If I could make my own table, then a little sed or perl would allow me to rewrite the .hal file with the correct pin numbers.

 

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

More
19 Nov 2021 23:19 #227035 by PCW
The7C81's GPIO --> physical pin mapping is in the 7C81 manual.

You can also list the mapping (and the pinout of special functions)
by using mesaflash's --readhmid function:

sudo mesaflash --device 7c81 --addr /dev/spidev0.0 --spi --readhmid

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

Moderators: cmorley
Time to create page: 0.071 seconds
Powered by Kunena Forum