NOVELTY - Electrochemical doping (M1) in metal oxides and metal chalcogenides, involves dissolving a metal precursor into a solution; controlling the temperature of the solution; adding a halogen precursor to the solution; and applying a potential between a working electrode and a counter electrode of an electrochemical cell to deposit halogen doped metal oxide film or metal chalcogenide film, where the electrochemical cell comprises the working electrode, the counter electrode, and the solution.    USE - For electrochemical doping in metal oxides and metal chalcogenides, and forming conductive which is transparent substance (claimed). The method is useful for fabrication of structures, e.g. homogenous p-n junctions and transparent conductive oxides, which are key components for high performance electronic, photovoltaic and optoelectronic devices. The method is also useful to form n-type metal oxides and chalcogenides for solar cells with high efficiency and low cost, e.g. n-type structures are created without using a vacuum; and transparent conductive layer (TCO) over substrate without using vacuum. The TCO layer is formed as a component in photovoltaic solar cells, including thin-film solar cells, in high-frequency piezoelectric resonators, in light emitting diodes (LEDs), and in other devices.    ADVANTAGE - The electrochemical deposition offers low cost, scalability, and large area processing capability. The electrochemically deposited films are denser and have lower resistivities than those prepared by other chemical methods, due to the fact that the film has to be electrically continuous for deposition to proceed. Since electrochemically deposited films are denser and have lower resistivities, post deposition annealing temperatures are also lower. In addition, unlike other chemical methods, monitoring the amount of charge transferred for the deposition allows precise and in-line control of the film thickness. Film thickness control is important for transparent conductive oxide films which serve as the antireflection layer in thin-film solar cells.    DETAILED DESCRIPTION - INDEPENDENT CLAIMS are included for the following:    (1) semiconductor device comprising either substrate and halogen doped metal oxide or metal chalcogenide film on the substrate, where the film is formed by electrochemical deposition; or an electrically conductive substrate and yttrium doped zinc oxide film on the substrate, where the yttrium doped zinc oxide film is conductive and transparent; and    (2) forming (M2) conductive which is transparent substance involving dissolving a zinc precursor into a solution; controlling the temperature of the solution; adding an yttrium precursor to the solution; and applying a potential between working electrode and counter electrode of an electrochemical cell to deposit yttrium doped zinc oxide, where the electrochemical cell comprises the working electrode, the counter electrode, and the solution.