p-ZnO films are prepared by thermal oxidation of sputter-deposited zinc oxynitride. Mechanism of nitrogen doping is described based on experimental evidences. An acceptor level 70–90 meV above the valence band edge is detected in p-ZnO films. A deep level located 1.72 eV above the valence band edge is present in p-ZnO films. Schottky and homojunction diodes with excellent device parameters are prepared.