7i43 firmware reconfiguration or new firmware?

More
20 Jun 2011 08:24 #10641 by kostas
Hi all,

Can the 7i43 firmware be configured to not include the index pin for the encoders and the enable pin for the pwm generators?
I'd like to have 4 pwms/encoders and these give a total of 24 pins, but only 16 of them are useful to me, so I'm loosing 8 pins which I need.

Or do I have to make a new firmware? In this case, can someone give me a place to start looking how to do it?

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

More
20 Jun 2011 10:48 #10643 by andypugh
I think you can use the index as a normal input pin without any problems (as long as you don't set index-enable)
I don't think there is any easy way to not use the PWM "enable" pin, but you can probably use the direction pin as a general-purpose output if you don't need it for your hardware.

There are two parts to this puzzle, whether the firmware "claims" the pin, and how the driver links it in HAL.
I _think_ that any pin not claimed by the firmware becomes available as a GPIO pin in HAL.

To have the firmware not claim the pin would require a new firmware.

I am surprised that you need more than 24 GPIO pins though, what are you doing with them?

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

More
20 Jun 2011 11:01 #10644 by kostas
Hello Andy and thanks for the quick reply.

I need the direction pin, since I'm driving four servos with pwm.
Any directions on where to start looking for building a custom firmware?

As for your question, I'm building a very small cnc machine with an embedded mini-itx motherboard. I'm using the parallel port for the 7i43 and can't include a pci card. I also want to build a front panel with lots of MPGs and buttons, so I'll have to connect these to the 7i43 GPIOs. My list is exactly 56 I/Os now, so I'll have to get rid of the 8! :)

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

More
20 Jun 2011 14:25 - 20 Jun 2011 14:33 #10663 by PCW
As Andy said, the index pins are usable as GP inputs. The PWM enable pin is not really usable however. Note that it is not the firmware that "claims" the pin but rather the HostMot2 driver, all IO is GPIO at startup , then the Hostmot 2 driver enables any special outputs belonging to module that the user requests via the num-XXXX command line argument. So for example if you don't request any PWMgens or stepgens, you would have all GPIO. The problem you have is the the PWM enable lines "belong" to the enabled PWM modules so the driver software turns them on (stealing them from GPIO).

As Andy said, removing the PWM enable lines would require new firmware. It sounds like you are not using any Mesa daughter cards, so you can pin-out the connectors any way you like. If you send me your desired pinout (and the 7I43 size:200K or 400K) I can make a custom bitfile. This is really easy as only the pinout file need be changed and I've done this many times.
Last edit: 20 Jun 2011 14:33 by PCW.

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

More
20 Jun 2011 14:36 #10665 by kostas
Thanks PCW. I appreciate it a lot! But there's no much point in changing only the pinout, without being able to use the extra pins (if I understand correctly what you're saying).
I think I'll be using the 4 index pins and remove some of my functionality for a start, at least until I find out how to make a new firmware (if it's not too hard).

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

More
20 Jun 2011 14:43 #10667 by PCW
When I said changing pinout, this includes things like dropping PWM enables and index pins (or even "B" encoder lines if only a simple down counter is needed)

So a new pinout can have only the special functions you need, for example I/O 0..7 could be encoder A/B lines 0..3, I/O 8..15 could be PWM/DIR lines 0..3 and I/O 16..23 could be GPIO

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

More
20 Jun 2011 15:06 - 20 Jun 2011 15:06 #10668 by kostas
That would be great!

I'll prepare a new pinout list and post it here then. Can you also make one of the PWMs having only the A encoder line, without changing the other PWMs? (which will have A and B )
Last edit: 20 Jun 2011 15:06 by kostas.

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

More
20 Jun 2011 15:09 #10669 by andypugh
kostas wrote:

Thanks PCW. I appreciate it a lot! But there's no much point in changing only the pinout, without being able to use the extra pins (if I understand correctly what you're saying).


The pins will be available. If the bitfile doesn't tell the driver that the pins belong to the encoder or pwm functions, then they will remain as GPIO pins and you will be able to use them as you wish. (including setting them to input or output)

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

More
20 Jun 2011 15:22 #10670 by PCW
Not sure what you are asking, The PWMs are independent of the encoders.

The encoders have A,B,INDEX pins and the PWMs have PWM/DIR/ENABLE (OR PWMA,PWMB,PWMC)

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

More
20 Jun 2011 18:41 #10675 by kostas
You're right, of course. I was confused and thought that the number of encoders was implicitly defined by the hm2_7i43 configuration, with the number of pwmgens.

The correct question is then: Can you also make one of the encoders have only the A encoder pin? In other words, the configuration of A+B encoder pins is global or defined per encoder?

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

Moderators: PCWjmelson
Time to create page: 0.198 seconds
Powered by Kunena Forum