A p-n junction is the junction at the interface between two differently doped layers of semiconductor material, one layer doped with a positive-type dopant, the other layer with a negative-type dopant. An electrical field is established at the p-n junction which gives direction to the flow of light-stimulated electrons.