Set Multiple pins with phased shift

Hello everybody,

Is it possible to generate 40 KHz square waves from multiple digital pins with Arduino (Uno or MEGA)? while be able to adjust a phase shift to each pin? (each pin generates wave at the predefined delay or phase )

Regards

Yes but why?

Mark

Dear Mark, Thanks for your response

I have 8 Ultrasonic trasducers array (40KHz) that I want to drive them with Arduino, so the goal is to send each transducer a square wave in order to steer the beam. But I do't know how to code the phase shifting to each trasducer?
So as a result each digital pin on the Arduino board transmit the signal with a certain phase shift (or delay)