This paper describes a flexible, completely digital, scanning tunnelling microscope developed around a fixed-point (TMS320C542) digital signal processor. During the development special attention has been paid to the cost of the instrument, without limiting its performance, and in some regards enhancing it. The instrument has been developed and tested in the air, at room temperature, and atomic resolution has been achieved. Its software provides a maximum of support to the user. The tip approach is completely automated. The control parameters can be adjusted based on an on-line identification and off-line (in simulation) optimization. This technique is completely integrated to the control software. It greatly simplifies the parameter optimization, and completely eliminates the risk of collision between the tip and the sample during the optimization. The scanning of the image and control of the tunnelling current are implemented in software by the DSP. This allows the precise identification and real-time compensation of the capacitive coupling between the scan tube electrodes and the current detector. The image analysis and processing software allows slope compensation, as well as the presentation of differential image, two-dimensional FFT and three-dimensional image.