We present an analog ramp generator for use in fast scanning tunneling or scanning probe microscopes. The analog design achieves low noise with a relatively simple circuit layout. The circuit requires minimal computer overhead because the X and Y ramps are generated using just two clocks and one digital control line. The resulting X and Y ramps are automatically set equal in magnitude, yielding images which remain square despite changes in scan size, number of lines per image, and tip velocity. We have used the circuit at X ramp frequencies above 10 kHz.