28128 Parallax Inc, 28128 Datasheet - Page 133

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
Chapter #7: Digital to Analog the Easy Way using
PWM
A resistor, capacitor, BASIC Stamp, and a single line of PBASIC code. That's all it takes
to build a D/A converter with 8-bit resolution. Sound too good to be true? In a sense it is,
because a buffer is necessary for this circuit to maintain a given voltage. Even so, it's
easy to build and offers a higher degree of accuracy than its resistive ladder counterpart.
Figure 7-1 shows the circuit that's used - it's a simple RC circuit. The input receives a
pulse width modulated (PWM) signal, and the output rises or falls to the desired voltage
level.
How can sending pulses of varied width and frequency control or set a voltage level at
the D/A output? The answer is the RC circuit shown in Figure 7-1. This circuit behaves
like a rechargeable battery. Figure 7-2 shows an example of the simplest kind of
capacitor, the parallel plate capacitor. The charges migrate from the battery terminals and
accumulate on the two metal plates until the voltage across the capacitor is the essentially
the same as the battery voltage.
P8
PWM
Input
10 k
Vss
1 µF
Output
D/A
Figure 7-1
RC Circuit
Which can be
connected to the
BASIC Stamp for
D/A conversion.

Related parts for 28128