Tuning of a resonator by means of digitally controlled capacitor bank