Design and characterization of Avalanche Photodiodes in submicron CMOS technologies