2. Use 555 timer: 555 timer is a commonly used integrated circuit, which can be used to generate pulse and square wave signals. By changing the capacitance and resistance value, the frequency and duty ratio of the square wave signal output by the timer can be changed, thus controlling the ringing time of the buzzer.
3. Use a programmable counter: A programmable counter can generate a square wave signal by changing the count value of the counter and the frequency of the clock input signal. By changing the counting value of the counter and the frequency of the clock input signal, the frequency and duty ratio of the square wave signal can be controlled, thus controlling the ringing time of the buzzer.