We report on a quantitative identification of the shallow oxygen donor in G
aN, compare the defects which are detected by optically detected magnetic r
esonance in the yellow and red emission bands in nominally undoped GaN, and
demonstrate that independent of the doping level the microscopic structure
of the Mg acceptor remains the same. There is a minor influence on the mag
netic resonance parameters of Mg, which comes from a modification of the st
rain and changes by Mg incorporation. With increasing Al content in the Alx
Ga1-xN alloy the g-values become isotropic. The compensating centers are mo
st likely vacancy-type complexes. (C) 2001 Elsevier Science B.V. Ah rights
reserved.