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.