Abstract:In order to solve the problems of limited duration and location of communication experiments of the Electronic Information Specialty in Universities and help students better understand the principle of spectrum analysis, a small program-based signal generator and spectrum analyzer were developed, and the advantages of the Internet were used to realize the effect of conducting experiments at any time. The signal generator can generate 6 kinds of commonly used signals including sine wave, square wave, triangle wave, random noise, Lorentz pulse and Simpson pulse in a certain frequency range, and output them through the mobile phone speaker or headphone jack. The speech received by the microphone is subjected to windowed spectral analysis, and the spectral results are displayed on the screen. Using a fixed type of mobile phone to test, the results show that the relative error of the frequency of the signal generator is 0% when generating a sine wave of 100 Hz to 10 kHz, and the relative error of the frequency of other waveforms is less than 1%. During spectrum analysis, the peak frequency measurement error is within 5 Hz, which has good experimental teaching guiding significance and field application applicability.