Fig. 4-2 flow chart for each waveform subroutine. As shown in the figure, after the interrupt service routines start, through the judgment to determine the output of a variety of waveforms, when the choice is not to judge the square wave, then turned to the sine of the judgment, so repeated