Shifting the phase of an Arduino PWM
If we're talking about the ATmega328P, the MCU used in the Arduino Uno, then phase shifts in PWM are possible by manipulating the TCNTx registers as well as using one of the modes that provides a variable TOP for each of the timers (5 or 7 for timer 0 or 2, and 8, 9, 10, 11, 14, and 15 for timer 1). Be sure to change them only as described in the "Modes of Operation" subsections in the section for the relevant timer in the datasheet so as to prevent glitches in the timing from occurring.