An assembly that could be used either as a switch or an attenuator includes
two or more optical channels defined by lithography within a substrate.
The two or more optical channels are positioned so that the ends of the
optical channels are at or near an edge of the substrate. A moveable MEMS
mirror is positioned near the edge of the substrate and the openings, with
the face of the mirror positioned to receive an optical signal from one of
the optical channels. The mirror can direct an optical signal from one of
the optical channels into another of the optical channels. Mirror position
can be changed to alter the path of the optical signal and to change the
coupling between the optical channels. In this way, the assembly of
optical channels within the substrate and the MEMS mirror can act as a
switch or as an attenuator.