Solar cells from thin films prepared by periodic pulse electrodeposition