A method and apparatus for generating and controlling volume of a speaker
of an appliance is disclosed. The appliance includes an IC chip connected
to an amplifier subsystem. The IC chip includes a square-wave audio
signal generator, a counter, a register, a comparator, and an AND gate.
Theses components of the IC chip are used to generate modulated audio
frequency square-wave signal. The modulated audio frequency square-wave
signal having pulses, each pulse has a width determined by the volume
control value. The modulated audio frequency square-wave signal is sent
from the IC chip to the amplifier subsystem on a single connection. At
the amplifier subsystem, the modulated audio frequency square-wave signal
is integrated over, filtered, and amplified to drive a speaker to produce
the desired sound. By adjusting the volume control value, the widths of
the pulses, thus the volume of the produced sound can be controlled.