We propose and demonstrate a tunable Q-switched erbium doped fiber laser with a digitally controlled micro-mirror array device. The tunable and pulsed output of the laser was achieved by the pixelated spatial modulation of the micro-mirror array. The wavelength tuning from 1530 nm to 1555 nm was shown with wavelength selectivity of similar to 0.1 nm and the pulsed operation was accomplished with 130 Hz repetition rate. (c) 2006 Optical Society of America.