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

More
4 years 2 months ago #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

Please Log in to join the conversation.

More
4 years 2 months ago #249932 by JPL

Please Log in to join the conversation.

More
4 years 2 months ago #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 to join the conversation.

More
4 years 2 months ago #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 to join the conversation.

More
4 years 2 months ago #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 to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum