A p-n junction that is formed in a single crystal of semiconductor material while the crystal is being grown from a melt. The amount and type of impurities added to the semiconductor are varied in a controlled manner as the crystal grows. A grown-diffused junction is produced by diffusion of impurities into the semiconductor after a grown junction has been formed, in order to produce the precise doping profile required.