A photonics-assisted binary/quaternary phase-coded microwave signal generator with fundamental/doubling reconfigurable carrier frequency applicable to digital I/O interfaces is proposed and has been verified by experiments. This scheme is based on a cascade modulation scheme, which is used to reconfigure fundamental/doubling carrier frequency and load the phase-coded signal, respectively. By controlling the radio frequency (RF) switch and the bias voltages of the modulator, the switching of the fundamental or doubling carrier frequency can be realized. When the amplitudes and sequence pattern of the two independent coding signals are set reasonably, binary or quaternary phase-coded signals can be realized. The sequence pattern of coding signals is applicable to digital I/O interfaces and can be directly generated through the IO interfaces of FPGA instead of an expensive high-speed arbitrary waveform generator (AWG) or other digital-to-analog conversion (DAC) systems. A proof-of-concept experiment is carried out, and the performance of the proposed system is evaluated from the aspects of phase recovery accuracy and pulse compression capability. In addition, the influence of residual carrier suppression and polarization crosstalk in non-ideal states on phase shifting based on polarization adjustment has also been analyzed.