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 .