We have fabricated and characterized fully programmable diffraction gratings consisting of 64 silicon micro-mirrors. The mirrors are 700 mu m long and 50 mu m wide with a fill factor of 90%. They are actuated electrostatically and move down by 1.25 mu m while showing negligible crosstalk and bowing as small as 0.14 mu m over 700 mu m. Extinction ratio up to 100 has been achieved by adjusting only 3 adjacent micro-mirrors. The gratings could operate either as light modulators up to 5 mu m or spectra generators up to 2.5 mu m. (C) 2012 Optical Society of America