28129 Parallax Inc, 28129 Datasheet - Page 133

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
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 28129