Microspectrometers have been fabricated using standard microelectronic processing, with additional compatible post-processing steps, for either a grating or a Fabry-Perot resonator which is used as dispersion element. The spectral resolution ranges between 20 and 50 channels in the selected operating range. Combining a standard microelectronic process with additional microelectromechanical systems (MEMS) processing for optical components results in small and low-cost solutions for many industrial and consumer applications.