We calculate the transient response of a PIN photodiode including the effects of diffusion currents for optical generation in arbitrarily thick p, i, and n regions (i.e., for short absorption lengths) for sinusoidal, impulse, and, where possible, step optical inputs. Analytic solutions are obtained for the sinusoidal and impulse responses; the impulse response may be used to compute the step response and the response to arbitrarily-shaped input functions. These results are extended to Schottky-barrier photodiodes. The impact of these results on device analysis and design is discussed. Methods of improving high speed device performance are suggested.< <ETX xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">></ETX>