A method of controlling a semiconductor device using a microcomputer
having a timer is provided. An interrupting step interrupts the
semiconductor device using the timer, by generating a control signal for
controlling a timing of turning on/off the semiconductor device. The
interrupting step is performed in accordance with an interrupting signal
which is input to the microcomputer at every occurrence of a
predetermined period. The interrupting step comprises a setting step of
giving a set value to the timer and a calculating step of determining a
set value for a subsequent interrupting step, such that the set value
determined in the calculating step is given to the timer in the setting
step of the subsequent interrupting step. Therefore, a longer time can be
allowed for determining a set value for the timer, and the processing
speed required for the microcomputer can be reduced.