摘要 |
<p>PROBLEM TO BE SOLVED: To provide a microcomputer equipped with a counting processing program which does not vary in the execution time of counting processing even when a clock frequency division ratio is varied. SOLUTION: This microcomputer 10 is a microcomputer which internally has a main program performing main processing and a subprogram performing counting processing needed to execute the main processing. This computer 10 is equipped with a program storage means 12 which stores the subprogram performing the counting processing, a frequency division ratio data storage means 14 which stores clock frequency division ratios set for the main processing and count numbers corresponding to the clock frequency division ratios, a selecting means 16 which selects one clock frequency division ratio out of the clock frequency division ratios stored in the frequency division ratio data storage means 14, a clock generating means 18 which generates a clock signal for the main processing by dividing the frequency of the input clock signal according to the selected clock frequency division ratio and outputs it, and a counter 20 which counts the input clock signal only by the count number.</p> |