A chromatic dispersion compensation device selectively delays a respective portion of spectral sections of each respective optical channel of an optical WDM input signal to compensate each optical channel for dispersion compensation, and includes a spatial light modulator having a micromirror device with a two-dimensional array of micromirrors. The micromirrors tilt or flip between first and second positions in a “digital” fashion in response to a control signal provided by a controller in accordance with a switching algorithm and an input command. A collimator, diffraction gratings, and Fourier lens collectively collimate, disperse and focus the optical input channels onto the array of micromirrors. Each optical channel is focused onto micromirrors of the micromirror device, which effectively pixelates the optical channels. To compensate an optical channel for chromatic dispersion, a portion of the spectral sections of each channel is delayed a desired time period by tilting an array of mirrors (i.e., spectral array) disposed in each spectral section at different spatial positions on the micromirror device.