Stepper motor wiring

We need to power a 24 V stepper motor using the CORE 2-ROS. For this, we have to connect a stepper driver to the board. To control the motor we need a PWM signal of 5V-18V with a frequency of 200Hz. We also need to connect a direction pin that needs to give a high or low signal at 5 V. We were wondering if we could do this by using two separate hmotor ports, hMotA for the PWM signal and hMotB for the direction signal. The following schematic is created, would this work?

Thank you for your time,

Kind regards,


this connection is correct from electrical point of view. I updated this diagram by connecting DIR+ input to hMotB output, to achieve direction control. In SL2690A documentation I see that DIR input can be also driven with high voltage signal, it does not have to be exactly 5V.