We study feedback control for discrete-time linear time-invariant systems in the presence of quantization both in the control action and in the measurement of the controlled variable. While in some application the quantization effects can be neglected, when high-precision control is needed, they have to be explicitly accounted for in control design. In this paper we propose a switched control solution for minimizing the effect of quantization of both the control and controlled variables in the case of a simple integrator with unitary delay, a model that is quite common in the computing systems domain, for example in thread scheduling, clock synchronization, and resource allocation. We show that the switched solution outperforms the one without switching, designed by neglecting quantization, and analyze necessary and sufficient conditions for the controlled system to exhibit periodic solutions in the presence of an additive constant disturbance affecting the control input. Simulation results provide evidence of the effectiveness of the approach.