AbstractFe (acceptor) and Nb (donor) doped epitaxial Pb(Zr0.2Ti0.8)O3 (PZT) films were grown on single crystal SrTiO3 substrates and their electric properties were compared to those of un-doped PZT layers deposited in similar conditions. All the films were grown from targets produced from high purity precursor oxides and the doping was in the limit of 1% atomic in both cases. The remnant polarization, the coercive field and the potential barriers at electrode interfaces are different, with lowest values for Fe doping and highest values for Nb doping, with un-doped PZT in between. The dielectric constant is larger in the doped films, while the effective density of charge carriers is of the same order of magnitude. An interesting result was obtained from piezoelectric force microscopy (PFM) investigations. It was found that the as-grown Nb-doped PZT has polarization orientated upward, while the Fe-doped PZT has polarization oriented mostly downward. This difference is explained by the change in the conduction type, thus in the sign of the carriers involved in the compensation of the depolarization field during the growth. In the Nb-doped film the majority carriers are electrons, which tend to accumulate to the growing surface, leaving positively charged ions at the interface with the bottom SrRuO3 electrode, thus favouring an upward orientation of polarization. For Fe-doped film the dominant carriers are holes, thus the sign of charges is opposite at the growing surface and the bottom electrode interface, favouring downward orientation of polarization. These findings open the way to obtain p-n ferroelectric homojunctions and suggest that PFM can be used to identify the type of conduction in PZT upon the dominant direction of polarization in the as-grown films.