Accurate determination of the resonant frequency, phase and quality factor in micro and nano-mechanical oscillators permits the detection of: (i) trace amounts of specific adsorbed molecules which affect the resonant frequency; (ii) pressure variations which affect the mechanical damping of the oscillator; or (iii) the temperature dependence of the elastic properties of the oscillator through a shift in the resonant frequency. To date, electrical detection of oscillations in cantilevered multiwalled carbon nanotubes (MWNTs) has eluded researchers in the field. Electrical detection allows a simple means for measuring the resonance frequency, phase and quality factor of cantilevers built into integrated circuits, or cantilevers whose response can be monitored as a function of any external parameter such as temperature or pressure. To this end, we described a fully electrical (actuation and detection) method termed harmonic detection of resonance (HDR) to measure mechanical oscillations in ambient conditions for two systems: Si-based micro- and MWNT based nano-cantilevers. Furthermore, we demonstrate that the resonant frequency in micro- and nano-cantilevers can be tuned without appreciable change in the quality factor which suggests that HDR is an ideal platform in device design and applications.