Spinx1 to 7i85

More
10 years 11 months ago #65078 by PCW
Replied by PCW on topic Spinx1 to 7i85
Sure, if you only enable 2 stepgens in the hal file (stepgen 0 and 1),
stepgen 2s pins are available as GPIO

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

More
10 years 11 months ago #65079 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

OT-CNC wrote: Since this is a lathe and I'm using X and Z, could the unused Y step pin be used for an enable?


Yes, you have 4 step/dir pairs per connector, and if you set num_stepgens=2 in the config then all 4 of those pins (on each header) become available as GPIO.

If you compare the show params list above with a similar one done after the config change you will see some "is-output" paramters appear which will help you spot which HAL pins are your newly-available GPIO pins.
Ah, and you need to "setp" them to outputs too.

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

More
10 years 11 months ago #65124 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
How do I invert the gpio? I get an error.

# the SPINX1 has a /enable (low to enable)
setp hm2_5i25.0.7i84.0.0.output-00-invert 1


I'm going with the P2 internal connector for now:
setp hm2_5i25.0.gpio.017.out-invert 1 , also tried -not. Debug states setp requires 2 arguments, 1 given.

What do I need to change?

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

More
10 years 11 months ago #65126 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

OT-CNC wrote: Debug states setp requires 2 arguments, 1 given.


You need to check the actual parameter names. From your parameter listing:

5 bit RW FALSE hm2_5i25.0.gpio.017.invert_output
5 bit RW FALSE hm2_5i25.0.gpio.017.is_opendrain
5 bit RW FALSE hm2_5i25.0.gpio.017.is_output


So
Code:
setp hm2_5i25.0.gpio.017.invert_output 1 setp hm2_5i25.0.gpio.017.is_output 1

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

More
10 years 11 months ago - 10 years 11 months ago #65132 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Sorry, I'm still confused with the logic.

Here is what I have:
net spindle-enable motion.spindle-on => hm2_5i25.0.gpio.017.out

setp hm2_5i25.0.gpio.017.invert_output 1
setp hm2_5i25.0.gpio.017.is_output 1

It loads and when I look at the hal configuration and toggle the spindle cw, stp, ccw I can see the status leds on pin 017 react. What confuses me is that hm2_5i25.0.gpio.017.in is corresponding correctly.
The hm2_5i25.0.gpio.017.out status is yellow (high) when cw/ ccw is active.
Am I reading into this too far? Can I assume this pin is working correctly and proceed with wiring?
Last edit: 10 years 11 months ago by OT-CNC. Reason: typo

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

More
10 years 11 months ago #65133 by andypugh
Replied by andypugh on topic Spinx1 to 7i85
The direct-to-FPGA IO pins can read their own status as an input.

So it sounds like things are working.

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

Moderators: PCW, jmelson
Time to create page: 0.062 seconds
Powered by Kunena Forum