The use of transparent conducting oxides in optoelectronic and photovoltaic devices has encouraged research on this field in recent years. Especially, cadmium oxide is a promising material for solar cell application but also for photodiodes and gas sensors. Mg doped CdO (CdO: Mg) films have been prepared on glass substrates by the ultrasonic spray pyrolysis (USP) technique. After the production, the films have been annealed in air atmosphere at 475 degrees C and half hour. Results on surface, optical and electrical properties of the films as a function of the thermal annealing have been reported. Thicknesses of the films have been determined by the filmetrics thin film measurement system. Transmission and absorbance spectra have been taken by UV-vis spectrophotometer. Atomic Force Microscopy (AFM) analysis indicates that the roughness of the surface decreases upon increasing Mg concentration. The minimum resistivity value of the films was 2x10(-3) Omega cm.