In energy-aggressive dynamic voltage scaling techniques, adaptive on-chip power supply, which can provide variable voltage in a wide range, is highly demanded. However, potential leakage and latch-up problems arise, when the substrate biasing voltages of the transistors vary with the supply voltage. An automatic substrate switching circuit (ASSC) is thus presented in this paper, with accurate voltage comparison, fast transient response and small silicon area. Experimental results show that the circuit automatically and accurately switches 1.3-nF pMOS substrate at a switching speed of 1.1 V/mus, with a switching voltage range of 1.1 to 3.3 V. The tracking error in steady state is below 18 mV. Fabricated in a standard 0.35-mum n-well digital CMOS process, the ASSC circuit only requires 0.017 mm 2 silicon areas, with a maximum static power of 116 muW.