Mesa 7i92 bit file help

More
26 Aug 2018 11:01 - 27 Aug 2018 07:00 #116600 by Clive S
I am trying to setup PP with a 7i92 using a 7i92_C11Gx2D.bit file. I have this successfully working on the bench using P2 on the 7i92.

I also have an mpg working using P1 GPIO 30&31 HDR pins 19&21.

Is it possible to have another bit file with P2 as above but P1 to be able to have 3 encoders ( for mpg ) and the rest with GPIO pins
Last edit: 27 Aug 2018 07:00 by Clive S.

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

More
27 Aug 2018 17:17 - 27 Aug 2018 17:18 #116662 by PCW
Replied by PCW on topic Mesa 7i92 bit file help
Its possible to do this but note that standard high speed encoders don't support 1X mode which is often desirable for MPGs so it may be better to just use software encoders (and all pins on P1 can be used for software encoder inputs)

The main problem with software encoders is that its possible to spin a 100 PPR MPG faster than a 1 KHz thread can accurately count. If you don't use the MPG this way (fast spins) a software encoder is probably the way to go. Also depending on PC hardware you may be able to run the servo thread faster.

I expect this issue to be resolved when the INM module is supported. This is a input filter/MPG module that supports 4 MPGs in 1X or 4X mode
Last edit: 27 Aug 2018 17:18 by PCW.
The following user(s) said Thank You: Clive S

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

More
27 Aug 2018 18:22 #116665 by Clive S
Replied by Clive S on topic Mesa 7i92 bit file help

I expect this issue to be resolved when the INM module is supported. This is a input filter/MPG module that supports 4 MPGs in 1X or 4X mode


Many thanks for helping me Peter
I have never heard of this module I take it it might be some time before it gets supported !!

I am using the 7i92_C11Gx2D.bit file. and have PathPilot running on P2

If I go with P1 having all pins as inputs to us three mpg's (100) does this mean that some can be configured as outputs.

Would you kindly make me a bit file to achieve this if you have time.
Clive

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

More
27 Aug 2018 22:29 - 27 Aug 2018 22:43 #116680 by PCW
Replied by PCW on topic Mesa 7i92 bit file help
In general this does not require custom firmware.

Any configuration allows GPIO pins to be set as either inputs (default) or outputs. All pins can be GPIO,
but pins that have a secondary function (say stepgen output or encoder input) must have the
secondary function disabled for the pin to become available as GPIO

Secondary functions are enabled/disabled in the driver command line with the num_function=N tokens.
So for example if you take your 7i92_C11Gx2D configuration and set num_encoders=0 num_stepgens=0 and
num_pwmgens=0 you will have nothing but GPIO...
Last edit: 27 Aug 2018 22:43 by PCW.

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

More
27 Aug 2018 22:45 #116682 by Clive S
Replied by Clive S on topic Mesa 7i92 bit file help

Secondary functions are enabled/disabled in the driver command line
with the num_function=N tokens, so for example if you take your 7i92_C11Gx2D configuration and set num_enecoders=0 num_stepgens=0 and num_pwmgens=0 you will have nothing but GPIO


Yes I thought I had read that somewhere, could you give me an example of how to just get the GPIO pins on the P2 without affecting P1 please.
Clive

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

More
27 Aug 2018 23:07 - 27 Aug 2018 23:08 #116683 by PCW
Replied by PCW on topic Mesa 7i92 bit file help
Since P2 has the first 5 (of 10) stepgens, first of 2 PWMgens and first of 2 encoders, you would use

num_encoders=1 num_stepgens=5 and num_pwmgens=1

This enables all the special functions on P2 but turns them all off on P1 so P1 is now 17 bits of GPIO
Last edit: 27 Aug 2018 23:08 by PCW.
The following user(s) said Thank You: Clive S

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

More
29 Aug 2018 16:14 #116781 by andypugh
Replied by andypugh on topic Mesa 7i92 bit file help

The main problem with software encoders is that its possible to spin a 100 PPR MPG faster than a 1 KHz thread can accurately count.


Though you probably won't notice. (unless you actually use the numbers on the MPG)

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

More
29 Aug 2018 17:03 #116792 by Clive S
Replied by Clive S on topic Mesa 7i92 bit file help

Since P2 has the first 5 (of 10) stepgens, first of 2 PWMgens and first of 2 encoders, you would use

num_encoders=1 num_stepgens=5 and num_pwmgens=1

This enables all the special functions on P2 but turns them all off on P1 so P1 is now 17 bits of GPIO


Attached is the pin out from the log file in PP. On P1 I017 - 30 - 31 - 32 - 33 - 20 - 22 I measure 5 v to ground

Is it possible to configure the other 10 pins to use as inputs or outputs

Though you probably won't notice. (unless you actually use the numbers on the MPG)


Yes I use the software mpg's for the lathe (if you spin the dial fast it just loses the steps) but I find it fine the manual work, I also pass it through a lowpass to smooth the clicks out

File Attachment:

File Name: 7i92pinout.txt
File Size:2 KB
Attachments:

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

More
29 Aug 2018 17:16 #116794 by PCW
Replied by PCW on topic Mesa 7i92 bit file help
Any of the 17 pins on P1 can be set to GPIO in or GPIO out as long as you only enable 5 stepgens, 1 pwmgen and 1 encoder

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

More
29 Aug 2018 17:48 #116800 by Clive S
Replied by Clive S on topic Mesa 7i92 bit file help

Any of the 17 pins on P1 can be set to GPIO in or GPIO out as long as you only enable 5 stepgens, 1 pwmgen and 1 encoder


I am trying to setp a pin with hm2_7i92.0.gpio.025.in 1 this errors with (is not wriitable)

I have tried to read the manual re gpio pins but don't see any examples of the syntax of how to change an output to a input etc.

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

Time to create page: 0.232 seconds
Powered by Kunena Forum