A monolithic active-quenching and active-reset circuit is presented, designed for avalanche photodiodes that detect single-photons by operating above the breakdown voltage (VB) in a digital mode, known as SPAD's. To the best of our knowledge, this is the first fully-integrated circuit of this kind ever reported. It operates with any existing SPAD, also with very high VB, since the quenching pulse is high enough to operate a SPAD up to 30V above VB. The deadtime after each photon detection is adjustable; the minimum value is 50ns, i.e. the maximum saturated counting rate is 20Mcounts/s. Free-running and gated-detector operation are provided; the minimum gate-on time is about 20ns. The small size, low power dissipation (20mW stand-by) and hig...