28128 Parallax Inc, 28128 Datasheet - Page 111

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
shown in Figure 5-6. These three circuit elements are all that's necessary to connect to the
BASIC Stamp to play tunes and tones.
The piezoelectric speaker shown in Figure 5-6 works like a rechargeable battery that
charges and discharges over short periods of time. By applying lots of pulses to the
circuit, the voltage output can actually be shaped into a signal.
These pulses can be varied in width and applied more or less frequently. Depending on
the pulse widths and frequencies, the capacitance of the piezospeakers gains or loses
voltage at varying rates. That's the gist of how pulse width modulation (PWM) works,
and it can be used to shape voltage signals. Figure 5-7 shows a sample of a PWM signal
applied to the input of an RC circuit as well as a sine wave output.
Sine waves can be used to represent musical notes. When a sine wave is played on the
piezoelectric speaker, the sound has a significantly improved quality. The variations in air
pressure caused by a tuning fork are represented by a sine wave. Program Listing 5.3
PWM Signal
P10
Vss
Sine Wave
Figure 5-6
BASIC Stamp Music
Circuit
Figure 5-7
Oscilloscope
Samples
Of a PWM
signal and a
sine wave.

Related parts for 28128