We have demonstrated a simple technique for building n-channel metal-oxide-semiconductor-field effect transistors (MOSFETs) and complex microelectromechanical systems (MEMS) simultaneously, instead of serially, allowing a more straightforward integration of complete systems. The fabrication sequence uses few additional process steps and only one additional masking layer compared to a MEMS-only technology, but uses processes outside the bounds of conventional complementary metal-oxide-semiconductor very large-scale integrated devices. The process flow forms the MOSFET gate electrode using the first level of mechanical polycrystalline silicon (polysilicon), while the MOSFET source and drain regions are formed by dopant diffusions into the substrate from subsequent levels of heavily doped polysilicon that are used for mechanical elements. We have observed that phosphorus-doped gate polysilicon shows negligible dopant diffusion through the gate oxide during high-temperature MEMS processing anneals, whereas arsenic-doped gate polysilicon shows significant diffusion through the oxide. We have adapted a commercial process and device simulator to model a wide range of device designs and process flows.