p-n junction solar cell working