In a stroboscopic imaging system, in order to make images to be correctly captured the synchronization must be strictly satisfied. Direct digital synthesizer (DDS) is a new frequency synthesizing technique used for creating arbitrary waveforms from a single, fixed-frequency reference clock. It has many advantages such as fast frequency conversion, high resolution of frequency and keeping phase continuous while frequency switches. By applying the DDS technique, this paper presents a method to generate the illumination signal of light source and the drive signal of device, and more attention is paid to how to perform the precise synchronization between the two signals. By adjusting the relative delay of the illumination and the drive signals, the phase can be changed. Allowing a sequence of images depicting the motion over the interval studied to be captured, which yields a complete picture of the vibration of a specimen or the surface structure of a MEMS device. Experimental results show that the high frequency of a signal could be up to 120 MHz with frequency resolution 4μHz. The phase resolution of 2-16 can be achieved by the proposed method. The relative phase error between illumination and driven signals could be down to 2-16. It is relatively easy to a synchronization illumination signal of light source and drive signal of MEMS accurately. However, as the two signals' transmission paths are different, their transmission delays are different also. Accordingly, a phase error would be caused and it would change as the signal frequency changes. Moreover, if the drive signal of external objects is used, the phase error, which is introduced via inaccuracy synchronizing the frequency of signal, would be superposed, indeed. These phase errors would affect the quality of imaging and the accuracy of measurement. In this paper, an effective method to adjust the errors is proposed. By means of specially designed hardware circuit, the error of phase and frequency synchronization between illumination signal of light source and drive signal of MEMS can be adjusted automatically. The proposed method improves the accuracy in synchronism and reduces the impact of the error of signal synchronization in the system. It is proved that the minimum relative phase error between illumination signal of light source and drive signal of MEMS can be reduced by more than 10 times using this method.