At present, the resolution of digital lithography based on digital micromirror devices is constantly improving. The assembly and debugging of traditional autofocusing devices are complicated, and the focus detection precision and range are difficult to meet the requirements of high precision digital lithography. Therefore, it has become an important research topic to explore the matching digital lithography autofocusing method. In this paper, a set of high resolution digital lithography system is established, which integrates digital lithography autofocus algorithm with variable step size peak search autofocus algorithm. Various common image sharpness evaluation functions and objectives at a variety of magnifications are used to realize the autofocus algorithm, and the performance of the image sharpness function is analyzed comprehensively. The experimental results show that by using algorithm fused with the autofocusing device in this paper, focus detection ranges of 10x, 20x and 40x objective lenses can reach 280µm, 160µm and 105µm, respectively, and the autofocusing accuracy can reach 0.625µm, achieving the submicron precision and large range autofocus at various magnifications. The experimental results of this paper can provide important reference value for autofocus of submicron scale digital lithography.