A method of fabricating an integrated circuit that includes a microelectromechanical
(MEMS) device. The method includes forming a MEMS device on a substrate and forming
an integrated circuit. The method further includes coupling the substrate to the
integrated circuit to form a sealed cavity that includes the MEMS device. The substrate
and the integrated circuit are coupled together in a controlled environment to
establish a controlled environment within the cavity where the MEMS device is located.