in the following text i will wright how a photovoltiac cell works based on my knowledge so please read trough it and correct me. when a photon hits a solar cell made of 2 layers of n-doped and p-doped silicon a electron in the p-doped silicon recieves the energy from the photon and jumps into the n-doped silicon because of the energy bands. so when the electrons jump into the n-doped silicon that layer gat an excess of negative charges and turns into a negative charge while the p-doped silicon gets an excess of holes so it turns positive. as the electric field created by the semiconductor stops em from directly passing to each other you can connect the sides in an other way so the electrons will flow and you can use that by connecting it to an engine or something. is the valance band the p-doped silicon and the conduction band the n-doped? why does an electron in the valance band recieve the energy and not in the conduction? where exactly does the p-n junction come in here? and why/how is the energy field preventing electrons from n-type to p-type to pass created?