  We address the problem of electronic and nuclear spin resonance of an
individual atom on a surface driven by a scanning tunnelling microscope.
Several mechanisms have been proposed so far, some of them based on the
modulation of exchange and crystal field associated to a piezoelectric
displacement of the adatom driven by the RF tip electric field. Here we
consider a new mechanism, where the piezoelectric displacement modulates the g
factor anisotropy, leading both to electronic and nuclear spin flip
transitions. We discuss thoroughly the cases of Ti-H (S = 1/2) and Fe (S = 2)
on MgO, relevant for recent experiments. We model the system using two
approaches. First, an analytical model that includes crystal field, spin orbit
coupling and hyperfine interactions. Second, we carry out density functional
based calculations. We find that the modulation of the anisotropy of the g
tensor due to the piezoelectric displacement of the atom is an additional
mechanism for STM based single spin resonance, that would be effective in S =
1/2 adatoms with large spin orbit coupling. In the case of Ti-H on MgO, we
predict a modulation spin resonance frequency driven by the DC electric field
of the tip.
