how to switch a data line on and off with a digital output "smallest possible"

i need to switch on and off some joining lines to a pair of stepper motors which is more pwm than data line

Please explain what you mean by "switch on and off".

What are "joining lines"?

What is "more pwm than data"?

Post a wiring diagram of your present setup (hand drawn, not a Fritzing pile), links to the stepper motors and motor drivers, and the code, using code tags.

See "How to use this forum" if you have questions about how to use this forum.