Mesa 7i92 bit file help
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
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
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
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
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
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.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
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...
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
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.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
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
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4865
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.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
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
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
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.