The simple flow chart of the main program is shown in Fig. 9. In the main program the adjustable speed is down by the instructions from keyboard inputs. When doing the adjustable speed, the voltage and frequency ratio is maintained constant.
The main program determines the voltage amplitude and frequency while PWM ISR (shown in Fig. 10) realizes the PWM by setting the proper compare registers values, dead band timer control register and timer period register, etc. Fig. 11 shows the relationship of the counter, compare register, and PWM output.
Before, dead band is considered (blue color), each pair of PWM output should be just complement. But dead time period should be considered and set to logic zero in order to avoid the conduction of both upper and lower switch in the mean time.
Hiç yorum yok:
Yorum Gönder