Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - 5 1 how does the single chip microcomputer identify the type of periodic signal and display the peak value?
5 1 how does the single chip microcomputer identify the type of periodic signal and display the peak value?
The recognition of waveform types must have preconditions, such as the input signal only contains simple and regular waveforms such as sine wave, square wave, triangle wave and sawtooth wave.

Take the waveform above as an example. According to your request, frequency measurement is very simple. Through the shaping circuit, all the input signals are rounded to square waves, and then measured by the timer and counter of the single chip microcomputer.

To display the peak value, there must be an A/D converter. If the waveform frequency is not very high, high-speed sampling can be carried out, and the maximum and minimum values obtained by bubbling method can show peaks and peaks. Then all the sampling points are averaged in absolute value (or root mean square operation, which is complicated), and the proportional coefficient (absolute average) between peak-to-peak value and rectified average value is obtained, and the waveform can be determined according to the proportional coefficient.