In the PWM circuit of the present invention, a PWM counter counts clock
signals. A reference value setting register sets a comparative reference
value for determining a duty ratio of a PWM signal. A comparator
generates the PWM signals based on a comparative result of the
comparative reference value and a count value of the PWM counter. A delay
device delays the PWM signal. A switching device switchably outputs the
output of the comparator and the output of the delay device in order of
time sequence. Thereby, the pulse phase of the PWM signal can be
adjusted.