How can I operate a stepper motor with the l293d driver by connecting it to the Arduino with only three pins? Exactly what I want to get to: I want to do cnc and I have no cnc shield, so can someone teach me how to use l293d in cnc (because l293d its ports are different from shield so how can i reconcile with that)
Post a data sheet for your stepper. We can advise nothing without knowing what you actually have.
The L293 is ancient and very inefficient technology based on bipolar transistors. It wastes at least 2 to over 4 volts as heat (depends on current). The L293 is a poor brushed motor driver and even worse stepper driver.
You may want to request that this thread be moved to Motors, Mechanics and Power (https://forum.arduino.cc/index.php?board=9.0).
The L293 would be my very last choice for CNC.
More so since the CNC shields are so cheap and will give you all you need.