how to drive hm2_5120.gpio.xx output pin active low

More
17 Aug 2022 05:28 - 17 Aug 2022 05:30 #249930 by ericg
Hi, I need some assistance on driving a gpio pin active low (maybe).
I have replaced my super PID and router with a vfd and spindle, now I need to drive the run/fwd pin on the vfd low instead of high.
I have a mesa 5i25 driving  a gecko g540 so I'm assuming I should drive pin 17 (output 1) low.
Partial code is
# --- SPINDLE-CW ---
setp hm2_5i25.0.gpio.007.is_output true
net spindle-cw  =>     hm2_5i25.0.gpio.007.out

I cannot quite see how to do that, should the gpio pin be set to -is_open drain? there is no -invert parameter that I can see, or should I send it through a logic 'not' inverter, or should I install a hardware not gate?

I would appreciate any suggestions
Eric
Last edit: 17 Aug 2022 05:30 by ericg. Reason: added more info

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

More
17 Aug 2022 06:45 #249932 by JPL

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

More
17 Aug 2022 07:01 #249933 by JPL
Humm, if you use pncConf you will in fact just have to check the 'inv' checkbox to invert any output. Did you used something else?

See here: linuxcnc.org/docs/stable/html/config/pnc...html#_mesa_i_o_setup

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

More
17 Aug 2022 07:10 #249934 by ericg
Thanks JPL missed that one, but a quick try did not work, I will read up some more to see if I missed something, I just added setp hm2_5i25.0.gpio.007.invert_output true after the line setp hm2_5125.0.gpio.007.is_output true but the pin was still high.

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

More
17 Aug 2022 08:21 #249936 by ericg
Sorry, should have thought before posting, I do not need to invert the output pin, it should be pulling low already through the gecko G540 as that is how I have it setup to drive my super PID, there must be some other issue.
apologies for wasting your time.

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

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