A microcontroller-based backlight module is proposed to reduce the leakage current effect in LCD. First, the mathematical model of the parasitical capacitance in LCD panel is conducted to explore the influence of leakage current effect. Moreover, a class D resonant backlight inverter is employed to act as the main circuit. Next, the phase angle variations caused by the parasitic capacitances is considered as a reference parameter in the proposed control strategy. By using the primary-side control and incorporating the DPLL function programmed by software to form a feedback mechanism to track the optimal operating frequency. And then the influence of parasitic capacitance can be reduced so as to eliminate the leakage current effect, hence, the system efficiency and stability will be improved. Complete mathematical analysis and design considerations are detailed. Experimental results agree with the theoretical predictions.