Grid connected voltage source inverters may be controlled in the stationary reference frame by means of the infinite impulse response (IIR) P+Resonat regulator. This regulator is able to correctly track fixed frequency sinusoidal references, but does not perform well if the frequency of the electric grid voltage is varied. In order to avoid the lack of precision to track variable frequency sinusoidal references, an adaptive IIR filter structure is proposed which offers good tracking properties even if the frequency of the grid voltage varies. This filter adapts its coefficients in real time and is inherently stable no matter the adaptation process, thus overcoming one of the most important drawbacks of the IIR filter structure. Furthermore, this structure is perfectly suited to be programmed in fixed point digital signal processors (DSPs) because of some important numeric properties, i.e., it has a high mapping precision and a low round-off accumulation, and it avoids quantization limit cycle oscillations. The proposed adaptive controller has been tested by means of the TI TMS320F2812 DSP. The obtained experimental results show up that this controller allows the correct tracking of a sinusoidal reference, even if this reference is time variant.