摘要 |
PROBLEM TO BE SOLVED: To perform A/D conversion synchronized with the period of duty control and to prevent an energization pulse from being turned off in the middle of A/D conversion processing. SOLUTION: A microcomputer is provided with an A/D comparison register and an energization control comparison register. The microcomputer sets A/D starting timing in the A/D comparison register every on-timing of the energization pulse. Then, when the value of a timer in the microcomputer agrees with the value of the A/D comparison register, an A/D conversion circuit is started to perform A/D conversion of the input signal. When the A/D conversion is completed, the off-timing of the energization pulse is set in the energization control comparison register (refer to B, C). When the value of the timer agrees with the value of the energization control comparison register, the energization pulse is turned off. However, when a duty ratio is 100%, the off-timing of the energization pulse is not set (refer to A) and the energization pulse is not turned off, either. |