A semiconductor device comprises a substrate made of an alloy having the formula Cd.sub.x Hg.sub.1-x Te where x is a non-zero number less than 1. The substrate has P type conductivity and a doping agent such as mercury is diffused into the substrate to form a region of N type conductivity therein. Before diffusion of the mercury into the substrate, a protective layer of cadmium telluride CdTe is applied to the surface of the substrate and the doping agent is diffused into the substrate through t...


