Abstract: The invention relates to an optical wavelength multiplexing and/or demultiplexing device. The device comprises a digital phase grating having at least four steps. The grating diffracts light of at least three different wavelengths in different central diffraction orders. Since the grating period may be high in comparison with the wavelengths light-emitting diodes may be used as light sources.