PN and Metal–Semiconductor Junctions