Patent ID: 7193621

Claim:
A method for setting a pixel clock of a display driving circuit, the display driving circuit being used to drive a display device, the method comprising: deriving a predetermined pixel clock from a display mode setting set by the display device; generating a reference clock, and using a plurality of scaling factors for respectively adjusting a frequency value of the reference clock to generate a plurality of calculation results, wherein the scaling factors are generated by using a plurality of first coefficients M and a plurality of second coefficients N, the first coefficients M are used to increase the frequency value, the second coefficients N are used to decrease the frequency value, and the first coefficients M and the second coefficients N are natural numbers; using a plurality of third coefficients R for respectively right-shifting R bits of the calculation results to generate a plurality of quotients, the third coefficients R being natural numbers, wherein the first coefficients M, the second coefficients N, and the third coefficients R form a plurality of combinations, and the combinations are calculated within a plurality of loop operations to generate the quotients; using a first difference between a quotient and the predetermined pixel clock which is calculated in a first loop operation as a minimum difference; if a second difference between a quotient and the predetermined pixel which is calculated in a second loop operation after the first loop operation is less than the first difference, using the second difference to update the minimum difference; recording values of the first coefficients M, the second coefficients N, the third coefficients R, and the minimum difference for each loop operation; after all of the loop operations are executed, using a quotient associated with the minimum difference as the optimum quotient; and controlling a clock generator to output an actual pixel clock signal by using a scaling factor and a third coefficient R corresponding to the optimum quotient, said actual pixel clock signal used to drive the display device.