28129 Parallax Inc, 28129 Datasheet - Page 144

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
Next, add a photoresistor in series with a 10 k
positive lead of your BASIC Stamp DVM should be connected to the node where the
photoresistor connects to the 10 kW resistor. This is a voltage divider output, and as the
resistance of the photoresistor varies, so will the voltage seen at the output of the voltage
divider. Also, point the top of the yellow LED directly at the face of the photoresistor as
shown.
PWM sets the RC circuit's output voltage, which in turn drives an LED circuit via a
voltage follower.
The light from the LED is transmitted to the photoresistor. Face the 2 devices at each
other as shown. The voltmeter from Chapter #3 senses the changes in voltage divider
output.
Let's try adjusting the brightness of the LED and see what happens to output at the
voltage divider. Make the changes to the Declarations and Main Routine sections, and to
the
Then save the program as P7_1R1.bs2, and run it.
' -----[ Title ]-----------------------------------------------------------
' Basic Analog and Digital - PL7_1R1.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
adcBits
P8
Display
10
kΩ
and
Vss
VAR
DAC
1 µF
Vdd
Vss
subroutines shown below. The
A
Figure 7-10: Transmitting an Optical Signal.
LM358
Byte
Vss
470
LED
resistor as shown in Figure 7-10. The
Vdd
Vss
n
10 k
variable is defined as a word.
Vss
2
4
3
Vdd
Vin(+)
GND
Vin(-)
ADC0831
8
Vdd
Vref
CLK
5
/CS
D0
1
7
6
P0
P1
P2

Related parts for 28129