  We present a crystal field theory of transition metal impurities in
semiconductors in a trigonally distorted tetrahedral coordination. We develop a
perturbative scheme to treat covalency effects within the weak ligand field
case (Coulomb interaction dominates over one-particle splitting) and apply it
to ZnO:Co$^{2+}$ (3d$^7$). Using the large value of the charge transfer energy
$\Delta_{pd}$ compared to the $p$-$d$ hoppings, we perform a canonical
transformation which eliminates the coupling with ligands to first order. As a
result, we obtain an effective single-ion Hamiltonian, where the influence of
the ligands is reduced to the one-particle 'crystal field' acting on
$d$-like-functions. This derivation allows to elucidate the microscopic origin
of various 'crystal field' parameters and covalency reduction factors which are
usually used empirically for the interpretation of optical and ESR experiments.
The connection of these parameters with the geometry of the local environment
becomes transparent. The experimentally known $g$-values and the zero-field
splitting 2D are very well reproduced by the exact diagonalization of the
effective single-ion Hamiltonian with only one adjustable parameter $\Delta
_{pd}$. Alternatively to the numerical diagonalization we use perturbation
theory in the weak field scheme (Coulomb interaction $\gg$ cubic splitting
$\gg$ trigonal splitting and spin-orbit coupling) to derive compact analytical
expressions for the spin-Hamiltonian parameters that reproduce the result of
exact diagonalization within 20% of accuracy.
