Capacitance-to-digital converter eases touch-based switch implementation